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

You're drawing a weird distinction here. The tag-name like part of `::part()` is the "part" string; effectively, a shadow host has a bunch of "part" elements in its pseudo tree, alongside its "before"/"after"/etc children.

What we do in the parentheses is totally unrelated. We *could* pretend that it's like a tagname and apply the same rules (both `part=""` and `::part()` only allow a single ident), and then move the "acts like a classname" part to a new `:state()` pseudo-class, but what's the point? Except for DOM's restriction on how many tagnames an element can have (one), there's literally no difference between a tagname and a classname; both are idents that categorize an element somehow. I don't know what's been gained by drawing such a distinction.

(insert Spongebob meme with Patrick moving things one spot to another)

The point of (eventually) adding `:state()` is to do more complicated things than raw idents, treating it like an *attribute*, which is indeed something distinct from tagnames or classnames.

(I'll note that :state() doesn't have any spec text, and doesn't even have an issue in this repository discussing it. Any discussion about :state() is purely theoretical.)

GitHub Notification of comment by tabatkins
Please view or discuss this issue at using your GitHub account

Received on Friday, 11 October 2019 20:13:52 UTC