[css-cascade] Where do Cascade Layers fit in the cascade? · Issue #5003 · w3c/csswg-drafts (original) (raw)
This is in relation to #4470 custom-origin proposal, and Cascade 5.
While originally based on the concept of “origins” as a useful way to balance larger-scale cascade layers, this feature isn’t necessarily tied to the current rules for origins and importance — which exist to balance power at an even larger scale between authors and users/user-agents. Instead,
In order to address the use-cases described in early conversations (Reset < Design System < Overrides
, Reset < Defaults < Patterns < Layouts < Components
, CMS Core < CMS Extend < Base Theme < Site Styles
, Old Styles < New Styles
), “custom origins” only need a higher weight than specificity. Given that, I think it would work best as a new cascade layer between scope & specificity.
That would mean:
- Authors get a new “top-level” cascade option above specificity, and not limited by selector practicalities, but still confined to origin & scope.
- The feature would not impact existing origin/importance and scope/shadow-dom rules, potentially rendering [css-cascade] How do Cascade Layers interact with Shadow DOM #4984 moot.