Skip to content

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

@plinss

Description

@plinss

I get multiple elements having the same part name, as well as multiple part names on a single element. But what's the point of being able to select parts by multiple names?

The example in the spec: ::part(tab active) would be better addressed by ::part(tab):state(active) rather than conflating state and structure. Are there any non-state use cases?

FWIW, the spec should also be clear about the difference between state and structure and recommend ::part() for structure and ::state() for state (and not give a state example for a structural feature). Pseudo-classes and pseudo-elements are different for a reason, let's not break that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions