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

What I had in mind was the inverse of current promoted approaches, namely: keep the resets and base styles unlayered, and instead layer up the rest of the author styles _(giving them a higher priority than the unlayered styles)_.

That way:
- browsers that don't understand `@​layer` get a basic set of styles (i.e. reset.css + base.css)
- browsers that do understand `@​layer` get the full experience (i.e. reset.css + base.css + [layered] styles.css)

This approach wouldn't require any jumping through hoops by authors, nor the use of a build step. It just works!

With this, an author can also decide for themselves whether they want to layer 3rd-party styles or not. Should the specificity of the 3rd-party CSS conflict with their own styles, then it would be recommended to do so.

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


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

Received on Thursday, 3 February 2022 22:11:24 UTC