- From: andruud via GitHub <noreply@w3.org>
- Date: Wed, 12 Nov 2025 22:22:53 +0000
- To: public-css-archive@w3.org
(Thanks for testing the prototype!)
I think as long are you're using plain _custom properties_, that behavior is working as expected, and we should not do anything about it.
> Unless, again, we solve this via making all the mixin's custom properties local by default
As in `--foo: line` implicitly becoming `@local --foo: lime`? I think that interferes too much with the regular case of just mixin in a custom property.
But, I think we still have a decision to make here about `@local`:
```css
@mixin --foo(@contents) {
@local --test: lightgreen;
@contents;
}
@mixin --bar() {
@local --test: pink;
@apply --foo {
background: var(--test); /* lightgreen? pink? */
}
}
```
At least from the perspective of this example alone, it seems wise to set up our function stack frames (i.e. "hyopthetical elements") such that declarations in the contents block do not see the locals inside the mixin.
--
GitHub Notification of comment by andruud
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12631#issuecomment-3524156663 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 12 November 2025 22:22:54 UTC