Re: [csswg-drafts] [css-cascade] Custom Cascade Layers (formerly "custom origins") (#4470)

> Check again. Unlayered are the _highest_ "normal" layer, and the _lowest_ `!important` layer.

Ok great. I misread the gist then.

> Nesting doesn't change the specificity of a layer. Nesting is only a way to name and group layers, nothing more. Adding multiple anonymous layers via import has no actual impact on the resulting weight of a style.

Yes, but the name of the layer depends on its import method, right? Therefore it determines the order of application of style rules due to the ordering of the layers.

> Inter-file specificity conflicts already exist. They already take source-order into account as a meaningful cascade metric. Lazy-loading CSS can already trigger jumpy rendering, purely based on selector specificity and the source-order of imports. But the only solution right now is to manipulate & delicately balance selectors. That's a hack, and it makes the problem even more fragile. It breaks the semantics of selector-specificity, and the resulting code does not in any way convey the layering intended.

I agree that versions of this problem already exist.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 26 August 2020 15:32:11 UTC