Re: [csswg-drafts] [css-cascade] Custom cascade origins (#4470)

I think this proposal is very much needed from the point of view of components builders. But I'd also like to stress that a shared component would often involve two types of styles:
 1. Structural styles (e.g. `display: flex` for some horizontal layout). Maybe not quite `!important`, but the desire is to make it very hard to change this style from author/user stylesheets.
 2. Stylistic styles that a component provides defaults for, but expects to be overriden. E.g. `:focus {outline: ...}`, etc.

Someone above mentioned similarity with `z-index` and that seems to fit pretty well conceptually.

Another point I wanted to make is that ideally whatever spec ends up here, it'd be polyfillable with the today's technology. Perhaps a WebPack plugin could be provided that would order `style/link` tags or selectors to respect the new specificity ordering. This could limit the spec quite a bit, but backward compatibility is critical for this, imho.


-- 
GitHub Notification of comment by dvoytenko
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4470#issuecomment-612163535 using your GitHub account

Received on Friday, 10 April 2020 18:41:53 UTC