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

@bramus said (https://github.com/w3c/csswg-drafts/issues/6323#issuecomment-2204484753):

> What about if we used `*` to indicate the unlayered ones? It doesn’t conflict with any of the existing names (which should b idents) and it already has the meaning of “everything”.
>
> E.g. `@layer *, reset, base, components, overrides` would the unlayered styles first, with the lowest priority.
>
> If no `*` is defined in the stylesheets using a layer statement, it is appended to the layer order (i.e. the current existing behavior).

To clarify, this would only affect the ordering of layers within the current “super”-layer? So for example, if this was set at the top-level, it would only affect the ordering of unlayered styles in the top-most layer. Layers nested within top-level layers would still be ordered the default way with the unlayered styles last?

Example of ordering for `@layer *, reset, base, components, overrides` with nested layers for `base`:

1. `*` Unlayered
2. `reset` layer
3. `base` layer
    1. `base.variables` layer
    2. `base.typography` layer
    3. `base.*` “unlayered”
4. `components` layer
5. `overrides` layer

-- 
GitHub Notification of comment by knowler
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6323#issuecomment-2206503157 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 15:15:54 UTC