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

Having I think we all agree that `@layer initial { }` is simply invalid and the whole block is rejected. However, what of `@layer foo, initial, bar;`? Is that whole rule rejected too, or do we simply order foo and bar and ignore the non-existing `initial` layer?

I'm not sure, but I suspect making the whole rule invalid is safer. Otherwise, we might have people who introduce a `@layer initial { }` block, fail to notice that that doesn't do anything, order that layer into the middle of the stack with `@layer foo, initial, bar;`, and some day, if we do make the `initial` keyword apply in that situation, that changes the ordering of their whole page. I think this scenario would be less likely to happen if we ignore the whole rule, as then the author would be confronted with the fact that the ordering of their `foo` and `bar` layer don't work either, making it easier to notice.

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


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

Received on Tuesday, 27 July 2021 16:43:48 UTC