Re: [w3c/webcomponents] Custom pseudo-classes for host elements via shadow roots (:state) (#738)

Is this the place for end user feedback? Or more like [here](https://github.com/w3ctag/design-reviews/issues/428)?

In any case, adding this here from [my tweet](https://twitter.com/karlhorky/status/1181541154577424385):

It would be cool to be able to save more complex data structures than just a simple present / not present. For example:

#### string key, string value

I think there would be a lot of use cases for apis like this:

```css
/* Separate state "variable" for mode of component */
my-element::state(mode="collapsed") { ... }
my-element::state(mode="preview") { ... }
my-element::state(mode="expanded") { ... }

/* Separate state "variable" for preview source */
my-element::state(preview="item-only") { ... }
my-element::state(preview="related") { ... }
```

#### other data structures?

The use cases here are more questionable. More just spitballing what use cases could exist...

```css
my-parent::state(dependent=my-deeply-nested-child) { ... }
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/738#issuecomment-539506432

Received on Tuesday, 8 October 2019 13:13:07 UTC