Re: [csswg-drafts] [css-mixins-1] Behavior for multiple `@result` rules (#13522)

I don’t have a strong preference, but one potential argument to allow accumulating `@results`: an ability to override the local variables inside the conditionals, but outside of `@results` (and then the conditionals might not even need to have results).

```CSS
@mixin --m() {
  --local: green;

  @media (width >= 600px) {
    --local: blue;

    @result {
        div { border: 1px solid; }
    }
  }

  @result {
    div { color: var(--local); }
  }
}
```

Functions already allow using conditionals inside, and this is something that would be nice to have with mixins as well, and should be possible to desugar as well, I guess?

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


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

Received on Wednesday, 25 March 2026 13:56:21 UTC