3 ms·
Last time I checked, "user" origin stylesheets come before (and so are easily overridden by) "author" origin stylesheets during the cascade, unless the declarat
by aragonite 2y ago
Last time I checked, "user" origin stylesheets come before (and so are easily overridden by) "author" origin stylesheets during the cascade, unless the declarations are marked "important". Could that be why userstyle extensions are not picking it up?
- myfonj 2y agoYes, general misunderstanding of the cascade is definitely one of the reasons, sadly. I admit that sharing origin level is sometimes OK, but I think that having control over the level at which we enter the cascade would be even better. Styles injected into "author" origin layer share context with "page", so are exposed to their scripts, and when we need to beat some author's !important rule, we must make sure we have equal or greater selector specificity, what leads to absurd selectors like `*:not(#a#b#c#d) { border-radius: 0 !important }` with hope that page author will not use matching selector with five IDs. In regular User Stylesheet any important rule wins over all author rules, regardless their selector specificity and importance. I find this design decision as very elegant and effective distribution of power.