Customizing Firefox Proton with CSS

Added - auto hide URL bar with delay. (can paste at the bottom). Not sure about this just yet - certainly good for times when my browser is squished into 1/4 screen…

hide-url

CSS to add
/* auto-hide nav-bar */

#navigator-toolbox{
  --uc-bm-height: 28px; /* Might need to adjust if the toolbar has other buttons */
  --uc-bm-padding: 2px; /* Vertical padding to be applied to bookmarks */
  --uc-navbar-height: -40px; /* navbar is main toolbar. Use negative value */
  --uc-autohide-toolbar-delay: 3000ms; /* The toolbar is hidden after 0.6s */
}

:root[uidensity="compact"] #navigator-toolbox{ --uc-bm-padding: 1px; --uc-navbar-height: -32px }
:root[uidensity="touch"] #navigator-toolbox{ --uc-bm-padding: 6px }

:root[sessionrestored] #nav-bar,
:root[sessionrestored] #PersonalToolbar{
  transform: rotateX(90deg);
  transform-origin: top;
  transition: transform 235ms linear var(--uc-autohide-toolbar-delay) !important;
  z-index: 2;
}
#nav-bar[customizing],#PersonalToolbar[customizing]{ transform: none !important }

#navigator-toolbox > #PersonalToolbar{
  transform-origin: 0px var(--uc-navbar-height);
  z-index: 1;
  position: relative;
}

:root[sessionrestored]:not([customizing]) #navigator-toolbox{ margin-bottom:  calc(2px - var(--uc-bm-height) - 2 * var(--uc-bm-padding) + var(--uc-navbar-height)); }

#PlacesToolbarItems > .bookmark-item,
#OtherBookmarks,
#PersonalToolbar > #import-button{
  padding-block: var(--uc-bm-padding) !important;
}

/* Make sure the bookmarks toolbar is never collapsed even if it is disabled */
#PersonalToolbar[collapsed="true"]{
  min-height: initial !important;
  max-height: initial !important;
  visibility: hidden !important
}

/* The invisible toolbox will overlap sidebar so we'll work around that here */
#navigator-toolbox{ pointer-events: none; border-bottom: none !important; }
#PersonalToolbar{ border-bottom: 1px solid var(--chrome-content-separator-color) }
#navigator-toolbox > *{ pointer-events: auto }

#sidebar-box{ position: relative }

/* SELECT TOOLBAR BEHAVIOR */
/* Comment out or delete one of these to disable that behavior */

/* Show when urlbar is focused */
#nav-bar:focus-within + #PersonalToolbar,
#navigator-toolbox > #nav-bar:focus-within{
  transition-delay: 100ms !important;
  transform: rotateX(0);
}

/* Show when cursor is over the toolbar area */
#navigator-toolbox:hover > .browser-toolbar{
  transition-delay: 100ms !important;
  transform: rotateX(0);
}

That is perfect, thanks!

1 Like

Running out of ideas now…

Any way to compress the menu sizes by reducing padding around individual menu
items? The text is swimming in a sea of padding.

I honestly quite like the Proton redesign tbh.

Yes, the buttons/tabs are a wee bit taller than I’d like, but otherwise it’s quite nice and neat IMO.

Hmmm you got the older one? My menu is quite nice now - similar size to old Firefox but nicer layout.

The buttons are easy to adjust in the top :root section…
–tab-min-height: 20px !important;
This is pretty small. 24 is small… 28 to 32 maybe medium.
The curves can be altered in the radius line - 2 numbers for opposite corners.
–arrowpanel-menuitem-padding: 4px !important;
is for the menu I think.

1 Like