Repository navigation
Home
Guides and snippets for customising Firefox CSS themes and browser configuration when using Adaptive Tab Bar Colour.
- How to Apply Custom CSS
- Customising Colour Transitions
- Adaptive Context Menus
- Compatibility with Third-Party CSS Themes
- Title Bar Buttons on Linux with GTK Theme
To apply custom CSS rules (userChrome.css) to Firefox:
- Open
about:configin the address bar and press Enter. - Search for
toolkit.legacyUserProfileCustomizations.stylesheetsand set it totrue. - Open
about:supportin the address bar. - Locate Profile Directory (or Profile Folder) and click the Open Directory (or Open Folder) button.
- Create a new folder named
chromein your profile directory if it does not already exist. - Inside the
chromefolder, create a text file nameduserChrome.css. - Paste your custom CSS rules into
userChrome.cssand save the file. - Restart Firefox.
Firefox applies a default transition effect to tab bar colour changes.
To disable transitions and allow colours to update instantaneously, add the following to userChrome.css:
:root {
--ext-theme-background-transition: none !important;
--inactive-window-transition: none !important;
}To enable smooth colour transitions across the browser toolbox, tabs, and URL bar, add the following to userChrome.css (thanks to @Moarram):
body, findbar, #navigator-toolbox, #TabsToolbar, #nav-bar, #PersonalToolbar, #sidebar-box, .tab-background, .urlbar-background {
transition:
background-color 0.5s cubic-bezier(0, 0, 0, 1) !important,
border-color 0.5s cubic-bezier(0, 0, 0, 1) !important,
outline 0.5s cubic-bezier(0, 0, 0, 1) !important;
}To enable smooth colour transitions in the Sidebery sidebar add-on, add the following to the Sidebery Style Editor (thanks to @MaxHasBeenUsed):
.Sidebar, .bottom-space {
transition: background-color 0.5s cubic-bezier(0, 0, 0, 1) !important;
}To apply the adaptive theme to context menus and pop-up panels, add the following to userChrome.css:
:is(menupopup, panel):where(:not([type="arrow"])) {
--panel-background-color: unset !important;
--panel-border-color: unset !important;
}On Linux, disable native context menus by opening about:config and setting widget.gtk.native-context-menus to false.
A third-party CSS theme works with Adaptive Tab Bar Colour as long as it uses Firefox’s standard colour variables (such as --lwt-accent-color for the tab bar background).
For an example of an ATBC-compatible CSS theme, see Firefox-Simple-One-Line.
On Linux systems using a GTK theme, Firefox’s title bar buttons may revert to the Windows style.
To prevent this, access about:config and set widget.gtk.non-native-titlebar-buttons.enabled to false. (Thanks to @anselstetter)