Re: [csswg-drafts] [css-cascade-5] Proposal to disallow interleaving of @layer and @import rules (#6522)

I see that the spec got adjusted in for this, but I'm a bit confused by the use of the word "They" in the note.

> Note: They are not allowed between (or intermixed with) @import and @namespace rules …

That "They", does it mean:

1. `@layer` statement at-rules (from the title of that section)?
2. `@layer` block at-rules _(mentioned as the last few words just above the note)_?
3. Both


A few thoughts that go with all these options:

- If option 1: then the first syntax in EXAMPLE 31 (listed just underneath it) would be invalid, no?
- If option 2: it's pretty unclear to me to know that "They" targets only this type of `@layer` at-rules. It also feels a bit redundant, as this guideline is also noted in another note above it _(“Note: `@layer` block at-rules cannot be interleaved with `@import` rules.”)_.
- If option 3: How would one append extra local CSS to the `theme` layer of EXAMPLE 31? I guess that would only be possible by creating extra sub-layers inside `theme`?

  @layer default, theme, theme.overrides, components;
  @layer theme.overrides {
    /* Override theme "base" layer here */
  @import url(theme.css) layer(theme);
  Feels weird to first have to write the overrides, and only then load its base layer.


I think option 2 is meant, but I'm not really sure reading all comments and logs here, as it's not explicitly mentioned 🤔

GitHub Notification of comment by bramus
Please view or discuss this issue at using your GitHub account

Sent via github-notify-ml as configured in

Received on Monday, 30 August 2021 23:35:28 UTC