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

With both options 2 and 3, the assumption is that you can nest these 'top' layers (see my previous comment) – and they only override the unlayered style _within their layering context_. So when importing a 3rd-party stylesheet that uses either `!layer-name` (option 2) or `!top-layer` (option 3) we would be able to pull their styles into our own lower-priority layer (e.g. `reset`) and the result is a layer called `reset.!layer-name` or `reset.!top-layer`. It is weaker than unlayered styles at the root, but stronger than unlayered styles in `reset`.

If we're not able to further nest third party styles, we can in both cases _go farther_. This is what leads to the potential for either `!top.!top.!top` or `!my-top.!my-top.!my-top`.

In other words, these two proposals function the same - and come with the same risks of escalation. The only difference is in whether or not we give the top stack a shared layer name that you can add sublayers to, or we let you add those layers to an unnamed top stack using some syntax.

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


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

Received on Wednesday, 23 October 2024 17:19:22 UTC