Widens Reddit post/comment pages only while preserving native feed and landing layouts. Vibe coded with OpenAI.
Install reddit-fluid-width.user.js with Tampermonkey or Violentmonkey to apply a constrained fluid layout only on Reddit post/comment routes while leaving feeds and landing pages completely native.
Current documented release: 1.0.1.
/r/<community>/comments/<post-id>/ post routes and their descendant pathshttps://www.reddit.com/r/satisfactory/ unchanged#subgrid-container and the direct .main-container.fixed-sidebar row316px while growing only the main post column#left-sidebar-container controls fluid width mode:
contentWidthPercent (default 95%)--reddit-fluid-width uses noLeftSidebarContentWidthPercent (default 95%)The default mode pins the post workspace inline-end/right edge to 100% with 0px outer margin and changes only the left edge as width adjusts. Set pinRightSidebar to false to center the whole grid as Reddit's left nav expands or collapses.
The userscript loads on Reddit /r/* routes so it is already present when Reddit opens a post through client-side navigation. Style still applies only on the canonical post route and its deeper in-post paths: https://www.reddit.com/r/<community>/comments/<post-id>/
<community> is matched case-insensitively after /r/, and comments must follow immediately.
#left-sidebar-container:
display !== nonevisibility strictly visiblegetBoundingClientRect().width > 0getBoundingClientRect().height > 0rect.right > 0--reddit-fluid-width becomes noLeftSidebarContentWidthPercentresizepushStatereplaceStatepopstatepageshowMutationObserver for left-rail relevant insert/remove/attribute changesstyle, class, hidden, aria-hiddenNo mutation polling or timers are used, and no transition overrides are applied. Comment expansion and in-thread pagination preserve the style while the route remains active. CSS percentages and min()/max() are recalculated by the browser as the window or Reddit workspace changes.
Edit near the top of the script:
const CONFIG = Object.freeze({
contentWidthPercent: 95,
noLeftSidebarContentWidthPercent: 95,
minGutterPx: 32,
pinRightSidebar: true,
});
contentWidthPercent controls the max container percentage width while a visible left sidebar is present (default 95%).noLeftSidebarContentWidthPercent controls the max container percentage width when the left rail is considered absent; default 95%.1..100:
contentWidthPercent falls back to 95 if invalid.noLeftSidebarContentWidthPercent falls back to 95 if invalid.minGutterPx controls minimum left/start safety gutter in pinned mode; in centered mode it is used on both sidespinRightSidebar controls geometry mode:
true (default): pins the inline-end/right edge at 100% (0px outer margin), only the left edge moves, and only one gutter is subtractedfalse (opt-in): keeps centered margins (margin-inline: auto) so width changes affect both sidesLowering noLeftSidebarContentWidthPercent in pinned-right mode creates a larger left inset while leaving the visible-sidebar mode unchanged.
The script validates values at runtime:
contentWidthPercent is clamped to 1-100% with a 95 fallbacknoLeftSidebarContentWidthPercent is also clamped to 1-100% with an independent 95 fallback16-128pxpinRightSidebar is treated as boolean and defaults to trueShared no-left-sidebar behavior (both geometry modes):
.grid-container:not(.grid-full) > #subgrid-container { grid-column: 1 / -1 !important; }#subgrid-container { max-width: none !important; }316px right rail are unchanged; visible-sidebar mode keeps Reddit's normal tracked behaviorPinned-right mode (pinRightSidebar: true):
#subgrid-container's inline-end anchored at 100% with 0px outer margincalc(100% - minGutterPx)316px and does not resize nav panelspinRightSidebar: true is the default behaviorCentered mode (pinRightSidebar: false):
margin-inline: auto#subgrid-container, main column, and 316px right rail centered as one cohesive gridcalc(100% - 2 * minGutterPx)1120px baseline and the post-route scopepinRightSidebar: false is an opt-in behaviorpinRightSidebar only changes geometry math. It does not click, expand, pin, or resize any Reddit UI panel; styling remains limited to #subgrid-container and its direct .main-container.fixed-sidebar row under post-only scope.#subgrid-container > .main-container.fixed-sidebar#subgrid-container316px#sticky-comment-composer-wrapper, left nav, back-button positioning, feeds, and comments are not directly modifiedThe floating back-button offset in wide layouts is protected by the fixed 1120px baseline plus a configurable start/left safety gutter in pinned mode, or equal per-side gutters in centered mode.
https://www.reddit.com/r/<community>/comments/<post-id>/; deeper in-post paths are supported too.If you open:
https://www.reddit.com/r/satisfactory/comments/abc123/example-post/
the script applies the fluid post width.
If you return to:
https://www.reddit.com/r/satisfactory/
the layout returns to native without the script's width changes.