Re: [csswg-drafts] [css-mixin-1] How does Shadow DOM influence mixin lookup? (#12671)

I have very similar use cases to @sorvell - I want to apply undefined mixins to the host and elements in my shadow roots to allow users theme all most components for outside of my shadow roots. The is _the_ shadow DOM theming capability we've been waiting for years for, and it would be a major blow to not support it.

To be clear on the construction, my shadow styles look like:

```css
// button.css
:host {
  @apply --button-base;
  @apply --my-button;
}
```

And users can theme all buttons in the page with:
```css
@mixin --my-button() {
  @result {
    button {
      border-radius: 10px;
      border: solid 1px red;            
    }
    [part~="label"] {
      color: blue;
    }
  }
}
```

This works in Chrome Canary today. I really don't want to lose that.

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


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

Received on Tuesday, 31 March 2026 19:16:34 UTC