Re: [csswg-drafts] [css-shadow-parts-1] Can class name selectors apply to a part? (#3431)

I always thought that this will be possible only via CSS tokens/states (https://github.com/w3c/webcomponents/issues/738), where the possible states of your component are part of the public API of it, and using them in conjunction with parts seems to be enough for such styling, e.g.:

```css
my-tabs-component::part(tab-button) {
  color: black;
}

my-tabs-component:state(selected)::part(tab-button) {
  color: red;
}
```

@tabatkins @domenic can you confirm that this compounding will be possible?

@JanMiksovsky this, of course, is not equivalent to what you're asking because it is not really the state of the part, but the state of the component that exposes the part, but I think it will cover a lot of ground. Also, consider that we haven't really work on the css state proposal, we need a formal proposal first.

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

Received on Tuesday, 18 December 2018 16:12:20 UTC