3 ms·
Yes, 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
by myfonj 2y ago
Yes, 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.