[WICG/webcomponents] DOM Parts / Template Parts: conflicting name with CSS parts (Issue #950)

There's [part attribute / CSS pseudo](https://developer.mozilla.org/en-US/docs/Web/CSS/::part) for custom elements:

```html
<template id="tabbed-custom-element">
<div part="tab active">Tab 1</div>
<div part="tab">Tab 2</div>
<div part="tab">Tab 3</div>
</template>

<tabbed-custom-element></tabbed-custom-element>

<style>
tabbed-custom-element::part(tab) {
  color: #0c0dcc;
  border-bottom: transparent solid 2px;
}

tabbed-custom-element::part(tab):hover {
  background-color: #0c0d19;
  border-color: #0c0d33;
}
</style>
```
If we wanted to have access to all element parts, that could be implemented as `el.part.tab`.
Same time, it would conflict by meaning with DOM/Template parts, had the proposal been promoted - here parts have meaning `fields`.

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

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

Received on Tuesday, 4 January 2022 03:28:03 UTC