W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2020

Re: [csswg-drafts] [css-shadow-parts] Unifying ::part() and ::--foo (#4900)

From: Maciej Stachowiak via GitHub <sysbot+gh@w3.org>
Date: Fri, 08 May 2020 18:49:06 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-625962618-1588963745-sysbot+gh@w3.org>
If you think of pseudo-elements and pseudo-classes as analogies for elements and classes, it's the case that an element has only one tag name and multiple class names. So perhaps it is right that any given element should only have up to one part name, and optionally multiple state names.

Going back to the calendar example, you'd probably have to do it as `<day class="weekday Saturday week-1 us-holiday>`. It is perhaps over-engineering to let pseudo-elements have multiple pseudo-element "tag names", since markup itself doesn't have that. While it would be neat, it seems like the world where there's only one tag name has generally be livable. And built-in UA pseudo-classes for form controls don't use multi part naming either.

Taking that direction, there'd be no need for `::part(day us-holiday)`, instead we just need to make sure `::--day:--us-holiday` works.

GitHub Notification of comment by othermaciej
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4900#issuecomment-625962618 using your GitHub account
Received on Friday, 8 May 2020 18:49:07 UTC

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