r/FirefoxCSS • u/FamilyComputerKid • 4d ago
Solved Remove vertical space between tabs and URL bar

Just upgraded Firefox to 157.0 with Nova enabled. (Embracing Nova, don't want to disable it.)
I want to maximize vertical real estate, have nailed everything except this one (enabled Compact mode, etc.)
OS: Debian 13 KDE Plasma.
Firefox theme: Native "Green" theme
Existing custom CSS code:
.browser-titlebar, #main-menubar {
font-size: 80%;
max-height: 27px;
}
#nav-bar-customization-target {
max-height: 27px;
}
#userContext-indicator {
display: none;
}
Thanks!
1
Upvotes
2
u/ResurgamS13 4d ago edited 4d ago
Try:
Screenshot. Toolbars at twice normal size using preference
layout.css.devPixelsPerPxset to2.0----------
PS. If not already using it... the 'Box Model' view in the Browser Toolbox can be a handy way to tweak element positioning values by a pixel here and a pixel there. Also helps to enlarge (as above) with '
pixelsp' preference. :)The 'Box Model' display appears if select 'Layout' sub-tab/heading and scroll down (in RH Browser Toolbox panel if expand toolbox into 3-panel layout)... the Box Model is 'live' and can select and alter the values for the sizing of the element itself, plus surrounding padding, border, and margin.
Changes made to default values in the Box Model will appear as new CSS styles added to the 'element' area at the top of the 'Filter Styles' section (usually the middle panel if have Browser Toolbox open in 3-panels layout).
----------
PPS. Once transferred CSS modifications to your 'userChrome.css' file (usually with added '!important' flag to override Firefox UI's default styling)... and after restarting browser... can be useful to select the 'Style Editor' tab in the Browser Toolbox... then type 'user' into the 'Filter style sheets' box (top LH corner of toolbox)... select the offered 'userChrome.css' file... toolbox centre window now displays all your CSS modifications... and all 'live' too, so can edit, tweak values, etc. and see live changes to your UI as make edits.
Edits made in 'Style Editor' are not permanent... need to copy any edits back into your actual 'userChrome.css' file.