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

I find the `@context` specifics a bit hard to track - maybe because I don't usually think of page/shadow contexts being ordered. But I suppose it's reasonable to say the order is something like:

1. normal shadow styles (lowest cascade priority)
2. normal page styles
3. important page styles
4. important shadow styles (highest cascade priority)

So your proposal would result in…

1. normal first-context styles (from either shadow or page?)
2. normal shadow styles
3. normal page styles
4. normal last-context styles (from either shadow or page?)
5. important last-context styles (from either shadow or page?)
6. important page styles
7. important shadow styles
8. important first-context styles (from either shadow or page?)

But if styles can be added to a first/last context from either the light or shadow DOM… does their originating context still come into play? Or do we now ignore the shadow/page context, and conflicts within first/last have to continue in the cascade? 

- As a solution to static top/bottom layers… I would rather see that built into the `@layer` rule. 
- I do see the additional use of specifying something akin to presentational-hints, but in my mind this confuses the current meaning of a `context`, since styles would now _move across contexts_ no matter where defined?

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


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

Received on Wednesday, 26 June 2024 00:09:20 UTC