W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

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

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Fri, 11 Oct 2019 21:26:57 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-541229867-1570829216-sysbot+gh@w3.org>
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 https://github.com/w3c/csswg-drafts/issues/4412#issuecomment-541229867 using your GitHub account
Received on Friday, 11 October 2019 21:26:59 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:54 UTC