Re: [WICG/webcomponents] Proposal: DocumentFragment.prototype.getElementByPart(name) (Issue #1021)

> Because `[part]` is "just as unique" as `[id]`

Parts are in no way unique, you can have as many parts with the same name as you want:

```html
<style>
    #wrapper::part(someName) {
        color: blue;
    }
</style>

<div id="wrapper">
    <template shadowrootmode="closed">
        <!-- All of these elements will be styled by the ::part(someName) selector -->
        <p part="someName">Part 1</p>
        <p part="someName">Part 2</p>
    </template>
</div>
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1021#issuecomment-1646792071
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1021/1646792071@github.com>

Received on Sunday, 23 July 2023 09:28:18 UTC