Re: [csswg-drafts] [css-cascade] stylesheet conditions (#9427)

I've also been wondering how the `@sheet` proposal interacts with all this.

It would allow:

```css
@import "unrelated.css";

@sheet a-sheet {
  .bar { color :green; }
}

/* syntax for how `a-sheet` is references is still undecided? */
@import "a-sheet" layer scope(.some-scope) supports(color) (screen);
```

By wrapping everything in a sheet and immediately importing that sheet it is possible to have some benefits:
- the styles and conditions are both local
- indent/nesting level remains low
- easy to enforce with a linter
- conditions aren't applied to other imports in the same file.

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


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

Received on Wednesday, 19 February 2025 21:44:49 UTC