NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
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.1.3.
Click a preview to open its full-resolution image.
The same public post at Reddit's native width (left) and with the default 95%
fluid width (right). The post column expands while the sidebars remain visible.
Full-resolution originals: before · after.
The settings panel in dark appearance:
Light appearance: view settings.
/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 throughout reddit.com and www.reddit.com for settings access and client-side navigation. Style 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 layout polling or transition overrides are used. 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. Settings saves use a short debounce to avoid writing every intermediate slider value.
Choose Reddit Fluid Width settings from your userscript manager's menu.
The menu is available on every page of reddit.com and www.reddit.com,
including the home page and feeds. Fluid width still applies only to supported
post/comment routes.
While settings is open, clicks, hover, keyboard focus, and scrolling stay with
the panel. Long content scrolls inside it. Closing restores page interaction
without activating a background control under the dismissal click.
Opening settings does not preselect a button, slider, or field. Keyboard focus
starts on the panel heading; press Tab to move to the first control, or
Shift+Tab to reach the last. Controls keep a visible focus indicator when you
navigate to them.
The translucent backdrop follows the page’s visible background: gentle black
shading over a light page, or a faint white veil over a dark page. The script
checks the page colors when you open settings. If they cannot be determined,
it uses the browser’s preferred appearance, with dark as the fallback.
There is no floating settings button. The panel follows your browser's preferred
light or dark appearance, including changes while it is open. Dark mode is the
fallback when no supported theme preference is exposed. Light mode uses
near-black text and dark mode uses light text. The panel contains:
The sliders and numeric arrows use whole-percentage steps. For finer control,
enter a decimal such as 95.1 directly in either percentage field. Changes
apply live without reloading. The page uses the percentage for its currently
visible sidebar state; the other percentage is saved for when that state changes.
The gutter and pin checkbox also update the layout immediately.
Reset defaults restores both percentages to 95%, the gutter to 32px, and
right-side pinning to enabled. It applies and saves these values immediately.
Clicking outside the panel, choosing Close, or pressing Escape keeps changes
already made and saves any pending change.
Preferences are stored separately from the script source. Updates retain saved
values, including decimals and an unchecked pin setting. Only missing settings
are initialized from the defaults. Editing the source defaults after preferences
have been saved does not replace those preferences; use the panel or
Reset defaults. If saving is unavailable or fails, the panel reports that
changes only apply to the current page.
The built-in defaults near the top of the script are:
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 trueThe settings panel requires native modal-dialog support (showModal). If the
browser cannot open a modal, settings stay closed so the script does not expose
an interactive panel over an unblocked page. Use a browser with that support.
Shared 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 behaviorBoth modes stay within the available parent width, including at 100%.
The 1120px baseline is retained when it fits; a narrower available track takes
precedence so the workspace cannot overflow merely to preserve that baseline.
pinRightSidebar 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 1120px baseline when space permits, 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.GM.getValue / GM_getValue read this script's two percentages, gutter, and pin preference.GM.setValue / GM_setValue save those preferences and explicit resets.GM.registerMenuCommand / GM_registerMenuCommand expose settings throughout the two matched Reddit hosts.Site-wide loading allows settings access and navigation into a post without a
full reload. It does not extend fluid styling to feeds or the home page. The
script observes the rendered route and sidebar geometry, adds its own styles
and dialog, and makes no network requests or uploads. Disabling it and reloading
restores Reddit's layout; saved preferences remain in the userscript manager.
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.
Rating: 0