Re: [csswg-drafts] [css-syntax][css-nesting] Design of `@nest` rule (#10234)

> In JavaScript it is possible to write blocks without any condition. I use this very frequently to group bits of code in a larger section.

> @tabatkins has also stated that they aren't attached to the name of this at-rule. Something that isn't tied to nesting would be nice.

Do we need the `@nest` part of the rule? Can we use naked `{}`? Looking at css-syntax, I don't immediately see why not. In other words:

```
:root {
  /* #region Colors */
  {
    --color-foreground: rgb(0 0 0);
    --color-background: rgb(255 255 255);
    --color-grey-40: rgb(108 112 108);
    --color-warning: rgb(242 149 0);
    --color-error: rgb(207 0 0);
  }

  /* ... etc ... */
}
```

> fixing the specifics is more web compatible than changing the current behavior after even longer.

To be clear, this issue blocks actually carrying out https://github.com/w3c/csswg-drafts/issues/8738. The more we mess around with the details here, the higher the risk that no change will happen at all.

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


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

Received on Saturday, 20 April 2024 16:52:19 UTC