[csswg-drafts] [css-nesting-1] Is `@layer` statement allowed to be nested in style rules? (#8714)

cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-nesting-1] Is `@layer` statement allowed to be nested in style rules? ==
The [normative text](https://drafts.csswg.org/css-nesting-1/#conditionals) does not allow it (emphasize added):

  > In addition to nested style rules, this specification allows nested group rules inside of style rules: **any at-rule whose body contains style rules** can be nested inside of a style rule as well.

However the following non-normative note links to the general `@layer` definition (for both block and statement `@layer`):

  > Specifically, these rules are capable of being nested group rules:
  >
  > - all the conditional group rules (`@media`, `@supports`)
  > - [`@layer`](https://w3c.github.io/csswg-drafts/css-cascade-5/#at-ruledef-layer)
  > - `@scope`
  > - `@container`

I do not see any non-contrived use of `@layer` statement nested in style rules but I also do not see a good reason to not allow it other than finding an appropriate term to replace *nested group rules*. Maybe *nested conditional **and cascade** rules*?

Note that [`@container`](https://drafts.csswg.org/css-contain-3/#at-ruledef-container) is already defined as a conditional group rule:

  > The `@container` rule is a conditional group rule whose condition contains a container query [...]

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8714 using your GitHub account


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

Received on Friday, 14 April 2023 06:35:25 UTC