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

> Right, so at that point we're defining something that we _know_ will be obsoleted almost immediately, but will provide a footgun (in the form of a name that authors aren't allowed to use) forever. Do we believe authors are clamoring for a solution that can be well-solved by a single predefined layer _so hard_ that we think it's worthwhile to throw away effort like that?

If the second part were definitely going to ship soon after, then I would agree with you. I am suggesting we ship the first part and see if the additional complexity is warranted.

> I just reread the gist and couldn't find any gotchas listed about nested layers. Can you elaborate?

Specificity/layer depends on method of importing ([here]( Possible confusion about how order of layer ordering works across stylesheets.
[Multiple loading](
Need to [remember]( to put the layer on all APIs that reference a stylesheet.

> Yes, a single predefined layer is simpler than multiple layers. But we're gonna move to arbitrary named layers anyway; they can't avoid that complexity. And having both a predefined layer and arbitrary layers makes the entire feature slightly more complex than it would otherwise be, so in the end it's slightly worse, not neutral.

I don't think it's clear to me that we will need arbitrary named layers. I do think there is likely a good argument for more than one predefined layer though. I wasn't saying it's either one layer or arbitrary layers, there is a midpoint.

> I think this one's a stretch, yeah. Even with only _one_ layer, there's still at least two completely distinct and very reasonable ways to use them that would cause bad clashes between libraries: with the layer as reset/defaults and unlayered code as normal, or with the layer as "normal" and the unlayered code as spot-overrides ("better !important").

I'm not sure what the difference is between these two interpretations, can you clarify?

GitHub Notification of comment by chrishtr
Please view or discuss this issue at using your GitHub account

Sent via github-notify-ml as configured in

Received on Friday, 21 August 2020 16:27:05 UTC