this post was submitted on 21 Feb 2024
6 points (100.0% liked)
Firefox Customs
3 readers
9 users here now
Post your unsupported Firefox customizations here!
From the makers of r/FirefoxCSS
Links
Related
Rules
- Posts must have flair!
- Posts cannot be memes/shitposts. They should be about Firefox customization with CSS.
- Please be civil. Bear in mind that many users come here for help and would be turned off by insults and rudeness.
- When posting large amount of code use a service dedicated to hosting text snippets, such as pastebin, hastebin, github gist or equivalent. Relatively short snippets can be wrapped in code-block for inline viewing.
- Do NOT use url-shorteners or link to compressed downloads (such as zip or rar) when sharing code.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yes, this is essentially an issue about how toolbars are layered. Many themes have some background image behind the whole toolbars area (or toolbox), and then have semi-transparent background color for the main toolbar from which the image is seen through.
To make selected tab look like it is connected to the toolbar below it must use that same semi-transparent background. BUT, if there is also a line separating the toolbars (implemented as box-shadow on nav-bar), then that line needs to be covered somehow. Built-in themes, with the exception of Alpenglow, all have fully opaque toolbar background-colors so there is no issue, the opaque selected tab can just cover it and all is well.
So selected tab needs to have some opaque background, but to make it fit I've chosen to make it have bunch of background-images positioned such they are (most of the time) indistiguishable from the toolbox background image(s). In short, selected tab also uses the same background-image as the toolbox.
But starting with 122 the titlebar has opacity and will-change properties with values that cause it (as well as tabs toolbar within it) that change how all these layers are stacked on top of each other.
The end result is that box-shadow of nav-bar gets drawn over selected tab, whereas what we want is to draw the selectsd tab with all its background-images over the box-shadow. Either that, or the clipping of the opaque background-images of selected tab doesn't actually cover the whole tab and thus the box-shadow is again seen through one of the non-opaque background-images.
Thanks mate, great explanation.