[csswg-drafts] [css-cascade-7] @sheet - allow nested @sheet statements? (#11999)

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

== [css-cascade-7] @sheet - allow nested @sheet statements? ==
This was discussed a bit in April 2023 but didn't land on a specific resolution for this behavior: https://github.com/w3c/csswg-drafts/issues/5629#issuecomment-1498299448

If you have a file named my_css.css as follows:

```
* { font-family: serif; }
@sheet foo {
  @sheet bar {
    font-family: sans-serif;
  }
  font-family: serif;
}
```

Should this be allowed? If so, it could follow the precedent for `@layer` and allow nested sheets via the `.` syntax:

`<link rel="my_css.css" sheet="foo.bar" />`

As mentioned in the [above CSSWG discussion](https://github.com/w3c/csswg-drafts/issues/5629#issuecomment-1498299448), we'd need to be explicit about how `@import` works in these cases (which would need some careful considerations), but before we get to that, we should resolve to support nested `@sheet` blocks at all.

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


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

Received on Monday, 24 March 2025 18:54:48 UTC