Re: [csswg-drafts] [css-cascade] Proposal: `@layer initial` should always be the first layer (#10094)

Based on https://github.com/w3c/csswg-drafts/issues/6323#issuecomment-2207341923, I guess the original proposal in this thread could also be renamed to something like `@layer !defaults`. The only downside is it's not possible to easily polyfill.

I still think the `@context` idea solves [something](https://github.com/w3c/csswg-drafts/issues/10094#issuecomment-2179369415) that the original proposal doesn't currently solve. Ideally, `@layer !defaults` would be placed alongside or prior to the presentational hints layer, so that it cascades before the shadow context.

It makes sense to place it _before_ presentational hints, because I expect default styles to have the lowest priority in the author origin, and be overridden by preshints. As an added benefit of this, the behavior of `revert-layer` on the first non-default layer would remain the same (i.e. it doesn't revert preshints). I'm just not sure if it's possible from an implementation perspective.

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


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

Received on Wednesday, 3 July 2024 23:06:18 UTC