Re: [csswg-drafts] [css-cascade-5] Allow authors to explicitly place unlayered styles in the cascade layer order (#6323)

@youknowriad I don't think any of the proposals will cover your use case? Given unlayered styles is a monolith, you can't have something that goes in between its parts, unless you wrap the whole preceding part with an `@layer`, but then it will be the backward compatibility you mention.

The `!overrides` won't solve all the problems, but I don't know if any other proposal here could help in your case better.

But regardless of which solution will be chosen, using _any_ layers at all will lead to the same backward compatibility issues, right?

If you'd want to move forward, then one scenario could be: introduce a setting that will make WordPress wrap your current lower implicit layers with explicit ones.

Let's say you'd select the Reset and Theme to go below unlayered — you could start from separating those. When `!overrides` or anything similar is introduced, you'll use this option to wrap the later half — the Block and User layers with it, moving those after any unstyled CSS (although, as it sounds, maybe only the User styles should be there? Alongside maybe some core utilities that need to override anything, but not _all_ the core/block layers).

If you can describe how a different proposal covers your use case better, please do!

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


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

Received on Thursday, 4 July 2024 07:40:59 UTC