Skip to content

Instantly share code, notes, and snippets.

@goobta
Last active September 23, 2026 18:01
Show Gist options
  • Select an option

  • Save goobta/6fd0817e7b34aa80a235e21beb494f90 to your computer and use it in GitHub Desktop.

Select an option

Save goobta/6fd0817e7b34aa80a235e21beb494f90 to your computer and use it in GitHub Desktop.
Obsidian (macOS): remove the gap next to the traffic lights when the ribbon is hidden

Obsidian (macOS): remove the gap next to the traffic lights when the ribbon is hidden

A one-line CSS snippet for people who hide Obsidian's left ribbon on macOS.

Before After
before after

The problem

With Settings → Appearance → Show ribbon turned off, the sidebar tabs in the top-left corner (Calendar here) sit well to the right of the red, yellow and green window buttons. The empty space is wasted and looks like a bug.

Why it happens

Obsidian reserves room for the traffic lights with a CSS variable. From Obsidian's built-in CSS:

.mod-macos {
  --frame-left-space: calc(80px - var(--ribbon-width));
}

.mod-macos.is-popout-window {
  --frame-left-space: 80px;
}

body:not(.show-ribbon) {
  --ribbon-width: 0px;
}

.is-hidden-frameless:not(.is-fullscreen) .workspace-tabs.mod-top-left-space .workspace-tab-header-container {
  padding-left: calc(var(--size-4-2) + var(--frame-left-space));
}

The traffic lights need about 80px. When the ribbon is showing, its 44px column already covers part of that, so the tab bar only adds 80 − 44 = 36px.

With the ribbon hidden, --ribbon-width is 0, so the tab bar gets the full 8px + 80px of left padding. The lights end at about 60px, so 20–30px of that is empty. Some themes add more on top: Underwater, for example, puts padding: 1px 15px on .workspace-tab-header-container-inner.

Pop-out windows have the same gap. They never have a ribbon, but Obsidian hard-codes the full 80px for them regardless.

The fix

Shrink the reserved space on macOS whenever there's no ribbon: in the main window when the ribbon is hidden, and always in pop-out windows:

body.mod-macos:not(.show-ribbon),
body.mod-macos.is-popout-window {
  --frame-left-space: 44px;
}

Because it only overrides the variable Obsidian already uses, turning the ribbon back on restores the normal spacing. Nothing else in the layout is touched.

Install

  1. Save no-ribbon-offset.css (below) into your vault's snippets folder: <vault>/.obsidian/snippets/. Create the folder if it doesn't exist.
  2. In Obsidian, open Settings → Appearance → CSS snippets, click the refresh icon, and turn on no-ribbon-offset.

Or from a terminal:

curl -L https://gist.githubusercontent.com/goobta/6fd0817e7b34aa80a235e21beb494f90/raw/no-ribbon-offset.css -o "<vault>/.obsidian/snippets/no-ribbon-offset.css"

Tuning

44px was tuned on the Underwater theme, which adds 15px of its own padding. On the default theme or others, the icon may land a little closer or farther from the lights. Change the number to taste: bigger moves the tabs right, smaller moves them left. Keep it big enough that the tabs don't overlap the green button.

/* Obsidian reserves 80px for the macOS traffic lights (8px + 80px on the
outer tab container, +15px from Underwater's inner padding). That only
makes sense when the 44px ribbon covers part of it. Shrink the reserve
when the ribbon is hidden, and always in pop-out windows (no ribbon). */
body.mod-macos:not(.show-ribbon),
body.mod-macos.is-popout-window {
--frame-left-space: 44px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment