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: Emilio Cobos Álvarez via GitHub <sysbot+gh@w3.org>
Date: Thu, 17 Oct 2019 07:41:11 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-543049143-1571298070-sysbot+gh@w3.org>
> They don't expose the part names in APIs like classes.

They do, right? https://drafts.csswg.org/css-shadow-parts/#idl

> By exposing a single pseudo-element type, and an optional set of classes, the shadow parts behave like regular pseudo-elements, and don't add anything new to the platform (except the fact that they exist). They fit into the selector model in a predictable and standard way. They'd also fit into any future Houdini APIs that expose pseudo-elements as their own type of pseudo-element without needing any additional API surface to expose the 'part name' concept.

Well, that ship kinda sailed as soon as you can match multiple elements with the same part name... `::slotted` also has a similar issue. So there will be zero-to-one "built-in" pseudo-elements (`::before` / `::after` / etc), but zero-to-n `::slotted` and `::part` pseudo-elements, regardless of there being multiple parts in the `::part` pseudo.

GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4412#issuecomment-543049143 using your GitHub account
Received on Thursday, 17 October 2019 07:41:13 UTC

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