Skip to content

Instantly share code, notes, and snippets.

@JoelLisenby
Created October 3, 2026 00:34
Show Gist options
  • Select an option

  • Save JoelLisenby/e8bb1dfa7fb2fef3377617b86e3de14b to your computer and use it in GitHub Desktop.

Select an option

Save JoelLisenby/e8bb1dfa7fb2fef3377617b86e3de14b to your computer and use it in GitHub Desktop.
better-firefox

better-firefox

Personal Firefox 157 (Nova) setup: darker chrome so sites stand out, tighter tabs, square-to-Nova corners, hide Share Firefox, and (if you want it) a toolbar proxy switch.

Leave browser.nova.enabled on. A signed add-on cannot restyle browser chrome on Firefox Release, so the CSS always goes in your profile. Pick a tier.

Chrome CSS, every tier

Do this once. Recopy the files if you pull a new version or change the corner radius.

  1. about:config → toolkit.legacyUserProfileCustomizations.stylesheets → true.
  2. about:support → Profile Folder → Open Folder.
  3. Create a chrome folder if it is missing.
  4. Put userChrome.css from this gist in that folder.
  5. Put userContent.css next to it if you want the same square corners on Settings and other about: pages.
  6. Restart Firefox.

userChrome.css here is baked at 0% (square) Nova radius. It also:

  • Shrinks tab padding above, below, and between tabs
  • Replaces Nova’s violet→orange toolbox gradient with solid #000000
  • Lifts the current tab and hover/active chrome just off black (#2a2a2a / #1c1c1c)
  • Uses #1a1a1a menus with hover #3a3a3a
  • Hides Share Firefox in the app menu

Tier 1 — chrome only

Profile CSS. No theme, no add-on.

You get the black top bar, tighter tabs, square corners, and hidden Share. Firefox’s own theme still colors some chrome (selected tab, address bar, panels) unless you also install Night Neutral.

Tier 2 — theme + chrome

  1. Install Night Neutral (or Load Temporary Add-on → manifest.json in the theme repo).
  2. Install the chrome CSS above.

The theme paints frame, toolbar, sidebar, and new tab #000000, selected tab #2a2a2a, address bar #0a0a0a. The CSS covers what the theme API cannot: corner radius, tab padding, the toolbox gradient, and hiding Share.

Tier 3 — add-on + theme + chrome

  1. Install Night Neutral and the chrome CSS (tier 2).
  2. Install Night Better.
  3. Pin Night Better on the toolbar (Customize Toolbar).
  4. In about:addons, next to Night Better open ... → Manage. Set Run in Private Windows to Allow.

Night Better adds:

  • A toolbar switch that turns your existing Firefox proxy on and off (proxyType only; host, port, PAC, SOCKS, bypass stay as you had them)
  • A Connection Settings form on the options page, filled from the live Firefox proxy. It writes only after you change a control. Firefox locks native Connection Settings while the add-on owns the proxy, so that form is the editor.
  • A 0–100 corner-radius slider. Copy the generated CSS from options after you move it (this gist is the 0% snapshot).

The proxy switch stays locked until Private Windows is allowed. Temporary add-ons need that granted again after each load.

Temporary load (this session)

about:debugging → This Firefox → Load Temporary Add-on → manifest.json in the theme repo, then again for the add-on repo. Temporary add-ons go away when Firefox restarts.

/* firefox-better:corners 0% of Nova (xsmall 0px … xlarge 0px) */
:root {
--border-radius-xsmall: 0px !important;
--border-radius-small: 0px !important;
--border-radius-medium: 0px !important;
--border-radius-large: 0px !important;
--border-radius-xlarge: 0px !important;
--border-radius-circle: 0px !important;
--tab-border-radius: 0px !important;
--toolbarbutton-border-radius: 0px !important;
--button-border-radius: 0px !important;
--urlbar-icon-border-radius: 0px !important;
--arrowpanel-border-radius: 0px !important;
--panel-border-radius: 0px !important;
--panel-menuitem-border-radius: 0px !important;
--menuitem-border-radius: 0px !important;
--popup-border-radius: 0px !important;
--input-text-border-radius: 0px !important;
--card-border-radius: 0px !important;
--card-border-radius-compact: 0px !important;
}
#urlbar-background,
#urlbar,
.urlbar-input-container,
.tab-background,
.tab-group-label,
toolbarbutton,
toolbaritem,
menupopup,
panel,
.panel-viewstack,
.toolbarbutton-1,
.toolbarbutton-icon,
.toolbarbutton-badge-stack {
border-radius: 0px !important;
}
/* Firefox Better — Nova stays on.
Tighter tabs, solid dark top bar, hide Share Firefox.
Corner radius is prepended by Night Better from the options slider
(0 square … 100 Nova). Profile folder → chrome/userChrome.css
about:config → toolkit.legacyUserProfileCustomizations.stylesheets = true
*/
/* firefox-better:tight-tabs
Nova default is 6px above/below (--tab-margin-block) and 8px inner
padding. Overflow-clip padding is the gap between horizontal tabs. */
:root {
--tab-margin-block: 1px !important;
--tab-vertical-block-margin: 1px !important;
--tab-overflow-clip-margin: 1px !important;
--tab-margin-overflow-clip: 1px !important;
--tab-inline-padding: 6px !important;
--tab-padding-inline: 6px !important;
--tab-inner-inline-margin: 2px !important;
--tab-margin-inline-inner: 2px !important;
}
.tabbrowser-tab {
padding-inline: var(--tab-overflow-clip-margin) !important;
}
.tab-background {
margin-block: var(--tab-margin-block) !important;
}
/* firefox-better:dark-topbar
Solid near-black chrome. Hover / selected / open is a small lift
off black so the current control reads without going light gray. */
:root {
--fb-chrome-bg: #000000;
--fb-hover-bg: #1c1c1c;
--fb-active-bg: #2a2a2a;
--fb-menu-bg: #1a1a1a;
--fb-menu-hover: #3a3a3a;
--fb-on-dark: #ececec;
--toolbox-background-color: var(--fb-chrome-bg) !important;
--toolbox-background-color-inactive: var(--fb-chrome-bg) !important;
--toolbox-background-color-gradient-leading: var(--fb-chrome-bg) !important;
--toolbox-background-color-gradient-trailing: var(--fb-chrome-bg) !important;
--toolbox-background-gradient: none !important;
--toolbox-background-image: none !important;
--lwt-additional-images: none !important;
--lwt-header-image: none !important;
--lwt-accent-color: var(--fb-chrome-bg) !important;
--lwt-accent-color-inactive: var(--fb-chrome-bg) !important;
--toolbar-background-color: var(--fb-chrome-bg) !important;
--tab-background-color-hover: var(--fb-hover-bg) !important;
--tab-background-color-selected: var(--fb-active-bg) !important;
--tab-text-color-hover: var(--fb-on-dark) !important;
--tab-text-color-selected: var(--fb-on-dark) !important;
--lwt-selected-tab-background-color: var(--fb-active-bg) !important;
--tab-border-color-accent: #333333 !important;
--tab-border-color-selected: #333333 !important;
--tab-border-color-selected-leading: #333333 !important;
--tab-border-color-selected-trailing: #333333 !important;
--tab-close-button-text-color-hover: var(--fb-on-dark) !important;
--tab-close-button-text-color-active: var(--fb-on-dark) !important;
--toolbarbutton-hover-background: var(--fb-hover-bg) !important;
--toolbarbutton-active-background: var(--fb-active-bg) !important;
--toolbarbutton-background-color-hover: var(--fb-hover-bg) !important;
--toolbarbutton-background-color-active: var(--fb-active-bg) !important;
--button-background-color-hover: var(--fb-hover-bg) !important;
--button-background-color-active: var(--fb-active-bg) !important;
--button-background-color-ghost-hover: var(--fb-menu-hover) !important;
--button-background-color-ghost-active: var(--fb-menu-hover) !important;
--button-background-color-menu-selected: var(--fb-menu-hover) !important;
--arrowpanel-background: var(--fb-menu-bg) !important;
--panel-background: var(--fb-menu-bg) !important;
--menu-background-color: var(--fb-menu-bg) !important;
--arrowpanel-menuitem-hover-background-color: var(--fb-menu-hover) !important;
--panel-item-hover-bgcolor: var(--fb-menu-hover) !important;
--button-text-color-hover: var(--fb-on-dark) !important;
--button-text-color-active: var(--fb-on-dark) !important;
--button-text-color-ghost-hover: var(--fb-on-dark) !important;
--button-text-color-ghost-active: var(--fb-on-dark) !important;
--urlbar-box-background-color-hover: var(--fb-hover-bg) !important;
--urlbar-box-background-color-active: var(--fb-active-bg) !important;
--urlbar-box-text-color-hover: var(--fb-on-dark) !important;
--urlbar-box-text-color-active: var(--fb-on-dark) !important;
}
body,
#navigator-toolbox,
#navigator-toolbox.fullscreen-floating-toolbox,
#titlebar,
#TabsToolbar,
#toolbar-menubar,
#nav-bar,
#PersonalToolbar,
#notifications-toolbar {
background-color: var(--fb-chrome-bg) !important;
background-image: none !important;
}
.tab-background:is([selected], [visuallyselected], [multiselected]) {
--tab-border-color-accent: #333333 !important;
background-color: var(--fb-active-bg) !important;
}
.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected], [multiselected]) {
background-color: var(--fb-hover-bg) !important;
}
.tab-content:is([selected], [multiselected]),
.tabbrowser-tab:hover > .tab-stack > .tab-content {
color: var(--fb-on-dark) !important;
}
.tabbrowser-tab:is(:hover, [selected], [visuallyselected], [multiselected]) .tab-close-button {
color: var(--fb-on-dark) !important;
fill: var(--fb-on-dark) !important;
}
toolbar .toolbarbutton-1:not([disabled]):is(:hover, [open], [checked]),
toolbarbutton.bookmark-item:not(.subviewbutton, [disabled]):is(:hover, [open]),
#tabs-newtab-button:not([disabled]):is(:hover, [open]),
#vertical-tabs-newtab-button:not([disabled]):is(:hover, [open]) {
--toolbarbutton-icon-fill: var(--fb-on-dark) !important;
color: var(--fb-on-dark) !important;
fill: var(--fb-on-dark) !important;
}
#urlbar .urlbar-page-action:not([disabled]):is(:hover, [open]),
#urlbar .identity-box-button:is(:hover, [open]),
#tracking-protection-icon-container:is(:hover, [open]),
#page-action-buttons > .urlbar-icon:is(:hover, [open]) {
color: var(--fb-on-dark) !important;
fill: var(--fb-on-dark) !important;
}
/* Bookmark bar and other XUL/panel menus sit on --fb-menu-bg, which is
already lighter than the black toolbar. Hover must lift further. */
menupopup,
#PlacesToolbar menupopup,
#BMB_bookmarksPopup,
#bookmarksMenuPopup,
panel[type="arrow"],
panelview {
--panel-background: var(--fb-menu-bg) !important;
--arrowpanel-background: var(--fb-menu-bg) !important;
background-color: var(--fb-menu-bg) !important;
}
menupopup > menu[_moz-menuactive="true"],
menupopup > menuitem[_moz-menuactive="true"],
menupopup > menucaption[_moz-menuactive="true"] {
background-color: var(--fb-menu-hover) !important;
color: var(--fb-on-dark) !important;
}
panelview .subviewbutton:not([disabled]):is(:hover, [open], [checked], [selected]),
.panel-subview-body .subviewbutton:not([disabled]):is(:hover, [open]) {
background-color: var(--fb-menu-hover) !important;
color: var(--fb-on-dark) !important;
}
/* firefox-better:hide-share
Share Firefox sits next to About / updates in the app menu. */
#appMenu-referrals-button,
#appMenu-referrals-separator,
#appMenu_menu_referralsPage,
#PanelUI-fxa-menu-share-firefox,
#share-tab-button,
#referrals-button,
toolbarbutton[data-l10n-id="appmenuitem-referrals"],
toolbarbutton[data-l10n-id="appmenu-referrals2"],
toolbarbutton[data-l10n-id="appmenuitem-share-firefox-title2"],
.share-tab-url-item {
display: none !important;
}
/* Firefox Better — 0% (square) corners on built-in Firefox pages (about:, settings).
The options page generates this at the current slider value. */
@-moz-document url-prefix("about:"), url-prefix("chrome:") {
:root {
--border-radius-xsmall: 0 !important;
--border-radius-small: 0 !important;
--border-radius-medium: 0 !important;
--border-radius-large: 0 !important;
--border-radius-xlarge: 0 !important;
--border-radius-circle: 0 !important;
--button-border-radius: 0 !important;
--input-text-border-radius: 0 !important;
--card-border-radius: 0 !important;
--card-border-radius-compact: 0 !important;
}
button,
input,
select,
textarea,
.card,
.toggle-button {
border-radius: 0 !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment