Skip to content

[css-shadow-parts] ::part(foo)::part(bar) instead of forwarding? #3841

@emilio

Description

@emilio

I was going through the shadow parts spec, and it seems to me like a better alternative to complex part-forwarding micro-syntaxes (albeit maybe a bit more simplistic?) could be just to allow multiple ::part() selectors.

So you would do ::part(filepicker)::part(button) rather than ::part(filepicker-button) or what not. Whether (or which) parts or a sub-component are exposed could still be controlled the same way exportparts works.

Seems to me the model would be much more consistent. Also, this is much easier (seems to me, at least, while I've been poking at this) implementation-wise, since you don't need to concatenate part names around to figure out if a part matches from a given tree. Stuff would just work.

Has this approach been considered?

// cc @fergald @rniwa @tabatkins

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions