Re: [csswg-drafts] `::details-content` vs `details::part(content)` (#9951)

> I think the only reason `::part(name)` has been designed as it is to avoid author names impeding with future built-ins.
> The syntax could have been `::--name` fwiw.

Citation needed?:::part() and the part attribute allows multiple identifiers, not sure how that could be achieved with a syntax like that. Part is strictly more powerful than regular pseudo elements.

> In fact, WebKit internally names some existing pseudo-elements like `::placeholder` or `::file-selector-button` as "user-agent parts".

Sure, but for each we need to define what pseudo classes if any are valid to the right of the pseudo. Also what properties apply to it. All these are answered for for part.

I don't see part as a built in pseudo element, it can expose multiple elements and elements can have multiple parts, it's a more powerful feature. The fact that WebKit uses that mechanism to implement some pseudos is kind of an implementation detail.

-- 
GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9951#issuecomment-1949916787 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 17 February 2024 09:39:42 UTC