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

@tabatkins Thanks for your thoughts! We care less about the precise mechanism and more about the scenario.

My initial thought is that your multiple-parts solution would probably be sufficient to support styling our tabs component and a number of similar components.

I do wonder if we'll hit cases where part state is more complex than a binary value, or multiple state values are in place. Another approach would give the author a way to expose only those part aspects that should be considered available for styling purposes. Using attributes as an example, something like

```
  <tab-button part="tab-button" part-attributes="selected" selected>Tab 1</tab-button>
```

might explicitly open up the component-specific `selected` attribute for styling:

```
my-tabs-component::part(tab-button)[selected] { ... }
```

We'll continue exploring the application of shadow parts to our library and look for cases were the current spec appears to be insufficient.

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

Received on Wednesday, 12 December 2018 00:06:54 UTC