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

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

From: Peter Linss via GitHub <sysbot+gh@w3.org>
Date: Fri, 08 May 2020 19:07:12 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-625970489-1588964831-sysbot+gh@w3.org>
To be clear, under my current proposal, your example would be: `<day part="day" part-class="weekday Saturday week-1 us-holiday">`, a 'class' attribute would not be exposed on the part but could be used within the custom element normally.

And it would be selected as: `::--day.us-holiday`, the pseudo-class notation would be used to select custom state of the part, e.g. `::--day.us-holiday:--checked`.

I believe this satisfies all the use cases, brings shadow part selector syntax into alignment with custom pseudo-classes, and allows the extension I mentioned above of allowing custom elements to potentially create built-in pseudo elements as well. And, like custom state is now really 'custom pseudo-classes', it turns shadow parts into 'custom pseudo-elements'.

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

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