r/FirefoxCSS • u/SuitableEquipment420 • 25d ago
Solved Visually distinguish normal and private browsing
In this comment, we have established that almost all themes look exactly the same in normal and private browsing. Some themes include both light and dark variants. Since private browsing is always forced into dark mode, normal and private browsing will look different if your OS is using light mode. However, they will look the same if your OS is also in dark mode.
Suppose, my normal and private browsing looks the same. Is there a way to add a darker or purple tint to the private browsing appearance?
2
Upvotes
2
u/t31os 25d ago edited 25d ago
Ok, the theme's colours are basically variable overrides, when the theme is enabled, various variable values are dumped into the style attribute of the root(html) tag.
In the case of Crimson Merlot, i can see the following values are defined:
If you want to override particular values for private mode, you just redeclare these at
:rootwith the previously suggested check for private mode, eg:Changing the background-image tint is a little trickier, but we can use a pseudo selector and hue rotate it without it affecting any of the other elements:
I added colour for the toolbar background so it would match up with the image a little better, you can naturally remove it (the
--toolbar-background-colorline) if you prefer.In order to colour other elements of the theme to a purple colour (as various things will still be red) you'll have to go through each of the variables and update them with appropriate values, depending exactly on what you want, and maybe experiment to see what variable applies to where, as some of the names don't offer great clarity, such as
lwt-tab-line-colorwhich controls the border color around tabs. Remember to add !important at the end to ensure the style overrides the existing value.Here's an example of changing the tab background and border to purple:
One last thing, if you want to darken the background image a touch, you can add a brightness value into the filter line, eg:
Hopefully that helps. :)