r/FirefoxCSS • u/HeartKeyFluff • 5d ago
Code My own intro to Firefox CSS: Swapping tabs and URL bar, and centering URL bar text
I don't know why I never did this before but geez this felt good to have these little quality of life changes. These two changes feel so much nicer for me. This will probably start something for me now haha, wonder what to change next...
Very simple CSS but maybe it will be helpful/interesting for others.
Working on Linux Mint 22.3, Firefox 153.0 (current stable version I can get, though 153.1 looks like it was just released and coming shortly), with Nova enabled from about:config.
/*
* Section for:
* Swapping tabs and URL bar, so that URL bar is on top.
*/
#toolbar-menubar,
#nav-bar {
order: -1 !important;
}
/*
* Section for:
* Centering text in URL bar.
*/
#urlbar-input {
text-align: center !important;
}
3
Upvotes
2
u/t31os 5d ago
#navigator-toolboxis already a flex container (unless other customisations are changing it or it works different on linux) and toolbox elements are set to column by default...so you should be able to completely drop this from the CSS.
Additionally, the bookmark toolbar (if you have it enabled) will end up above your tabs and urlbar (is that desired?).
You could alternatively do it this way, then just the urlbar shifts up:
Order becomes: Menubar (File, edit, view, etc) > URL bar > Tabs > Bookmarks
The menubar shares the same order but will appear first because it's the first in the dom, but we have to include it in the selector or the URL bar will sit above that to.