Re: [csswg-drafts] [css-cascade] Better name for "custom origins"? (#4981)

I'm not certain I think it necessarily needs to be the same as cascade origins, if we're okay with slightly reinterpreting !important in a custom cascade layer.

Here's my mental model for how this could work: specificity gains a fourth value, above IDs, which is the cascade layer.

When you set up the cascade layers for your page, you specify where both the normal and the important rules go in the ordering. (Possibly if you don't specify an !important version, we can default it to inside-out ordering.)

Then, any rule in a custom layer always lives in the author origin, and get shifted into one layer or another based on !important or not. Custom-layer styles never go into the author-important layer.

Then because this is a specificity alteration, not an origin alteration, we avoid the proliferation of origins that would make shadow-scoping complicated.

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

Received on Thursday, 30 April 2020 20:25:44 UTC