@@ -121,7 +121,7 @@ as authors can use ''::part()'' without fear of accidental over-styling.
121
121
Exposing a Shadow Element: {#exposing}
122
122
=============================================================
123
123
Elements in a <a>shadow tree</a> may be exposed for styling by stylesheets outside the tree
124
- using the part and partmap attributes.
124
+ using the part and exposedparts attributes.
125
125
126
126
Each element has a <dfn export for="element">part name list</dfn>
127
127
which is an [=ordered set=] of tokens.
@@ -133,8 +133,6 @@ with keys that are [=strings=]
133
133
and values that are [=ordered sets=] of [=strings=]
134
134
(part names that are selectable inside this element).
135
135
136
- Issue(w3c/csswg-drafts#2414): Document how the part name map will be exposed via IDL.
137
-
138
136
Each <a>shadow root</a> can be thought of as having a <dfn export for="shadow root">part element map</dfn>
139
137
with keys that are [=strings=]
140
138
and values that are [=ordered sets=] of elements.
@@ -199,16 +197,16 @@ not an id or tagname.
199
197
</script>
200
198
</pre>
201
199
202
- Forwarding a Shadow Element: the <{html-global/partmap }> attribute {#partmap -attr}
200
+ Forwarding a Shadow Element: the <{html-global/exposedparts }> attribute {#exposedparts -attr}
203
201
----------------------------------------------------------------------------------
204
- Any element in a shadow tree can have a <dfn element-attr for=html-global>partmap </dfn> attribute.
202
+ Any element in a shadow tree can have a <dfn element-attr for=html-global>exposedparts </dfn> attribute.
205
203
If the element is a shadow host,
206
204
this is used to allow styling of parts from hosts inside the <a>shadow tree</a>
207
205
by rules outside this the <a>shadow tree</a>
208
206
(as if they were elements in the same tree as the host,
209
207
named by a part attribute).
210
208
211
- The partmap attribute is parsed as a comma-separated list of part mappings.
209
+ The exposedparts attribute is parsed as a comma-separated list of part mappings.
212
210
Each part mapping is one of:
213
211
214
212
<dl class=switch>
@@ -233,7 +231,7 @@ Issue(w3c/csswg-drafts#2411): Decide whether to allow "ident1 => ident2 ident3 .
233
231
as shorthand for "ident1 ident2, ident1 ident3, ...".
234
232
235
233
Issue(w3c/csswg-drafts#2411): Decide whether to allow wild-card forwarding,
236
- e.g partmap ="button-* buttons".
234
+ e.g exposedparts ="button-* buttons".
237
235
Consider excluding sub-parts that have been explicitly forwarded.
238
236
Consider a mechanism to exclude sub-parts without forwarding them.
239
237
@@ -243,7 +241,7 @@ Consider a mechanism to exclude sub-parts without forwarding them.
243
241
</style>
244
242
245
243
<template id="c-e-outer-template">
246
- <c-e-inner <b> partmap ="innerspan textspan"</b> ></c-e-inner>
244
+ <c-e-inner <b> exposedparts ="innerspan textspan"</b> ></c-e-inner>
247
245
</template>
248
246
249
247
<template id="c-e-inner-template">
@@ -366,3 +364,15 @@ but never match additional <a>shadow-part pseudo-elements</a>.
366
364
would select just the one button's label,
367
365
ignoring any other labels.
368
366
</div>
367
+
368
+ Extensions to the {{Element}} Interface {#idl}
369
+ ==============================================
370
+
371
+ We expose the `part` and `exposedparts` attributes as read/write string properties on Element.
372
+
373
+ <pre class=idl>
374
+ partial interface Element {
375
+ attribute DOMString part;
376
+ attribute DOMString exposedParts;
377
+ };
378
+ </pre>
0 commit comments