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

In my mind the distinction between pseudo elements and pseudo classes has always been about structure. Pseudo elements are things that would otherwise be elements if they were exposed to DOM. Pseudo classes are either expressions of state or some kind of other 'class-like' distinction that isn't expressed as a regular class. A pseudo class isn't necessarily transitory (tons of examples of non transitory pseudo classes, and yeah, many of those are somewhat structural, but they're more descriptive of structure, not structural type).

So under that distinction, your holiday example would clearly fit into the nature of a pseudo class. And having multiple pseudo element names feels as weird to me as having multiple element names would be on a DOM node. Note that I'm not necessarily objecting to this feature, I'm questioning where the line should be drawn and if this feature makes sense given where the line falls.

I see ::part as a custom pseudo element, and :state as a custom pseudo class. Splitting pseudo classes into 'class-like' and 'state-like' could be interesting, but shouldn't necessarily push class-like things into the category of pseudo elements.



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

Received on Friday, 11 October 2019 18:32:25 UTC