Re: [csswg-drafts] [css-shadow-parts] What's the purpose of multiple idents in ::part()? (#4412)

I want to stress again tho that :state() is managed internally by the component, while part is managed externally by the shadow tree holding an element.  Using :state() for holidary/weekend/etc means that the ::part(day) element itself (a) has to be a custom element, and (b) has to manage the fact that it's a holidary or weekend or something on its own. That's more complexity than I think we want to require for anything that wants to put a sub-element in more than one category.

> doesn't work because :not() can't contain pseudo elements.

:matches() allows pseudos; the only reason :not() doesn't is because with the previously-existing set of pseudos, there's absolutely nothing it could do. (That's no longer true now that we allow :hover and such on pseudo-elements, and it was never true for UA-prefixed pseudo-elements that sometimes had custom pseudo-classes for themselves, so we need to fix this.)

There's nothing wrong, semantically, with `::part(day):not(::part(weekend))`; it works the same as `:matches(::part(day), ::part(weekend))`.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at using your GitHub account

Received on Friday, 11 October 2019 21:26:59 UTC