- From: Romain Menke via GitHub <noreply@w3.org>
- Date: Sun, 11 Jan 2026 17:50:47 +0000
- To: public-css-archive@w3.org
romainmenke has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-mixin-1] Example 13 is confusing by using a fictitous `@nest` rule ==
```css
p.nested {
@env --color1: red;
@nest {
@env --color2: green;
@nest {
@env --color3: blue;
background: linear-gradient(env(--color1), env(--color2), env(--color3));
}
}
}
```
> (Where `@nest` here is a fictitous rule representing a nested declarations rule.)
---
Is it maybe better to use CSS that actually exists and is valid?
```css
p.nested {
@env --color1: red;
& {
@env --color2: green;
& {
@env --color3: blue;
background: linear-gradient(env(--color1), env(--color2), env(--color3));
}
}
}
```
This also somewhat illustrates the lexical scoping but it is something that actually works.
So anyone can copy/paste this snippet and try it out and inspect how it works.
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13328 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 11 January 2026 17:50:48 UTC