Re: [w3c/webcomponents] Support Custom Pseudo-elements (#300)

> >> One element in the shadow DOM corresponding to more than one part.
> > 
> > Here's one use case. If you had a carousel, you might want to have one selector to match any image, and another one to match the currently selected/shown image.
>
> That sounds like a state, rather than a logical part. So I would like to be able to target shadow-pseudos in different states, but they would still just have one matching pseudo selector – something like `::shadow-pseudo(.state)`.

It's indeed a state. However, wanting to style an element with a particular state is not mutually exclusive with wanting to style an element of a particular part. In fact, if you look at a typical website's CSS, most of CSS selectors are concerned about finding parts of a page to style, not necessary of a particular state. I'd imagine that's why @othermaciej said "the main intent", not "the intent", or "the only intent".

-- 
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/300#issuecomment-273397123

Received on Wednesday, 18 January 2017 06:44:10 UTC