@@ -249,13 +249,13 @@ allows you to select elements that have been exposed via a <{html-global/part}>
249
249
The syntax is:
250
250
251
251
<pre class=prod>
252
- ::part() = ::part( <<ident>> )
252
+ ::part() = ::part( <<ident>> + )
253
253
</pre>
254
254
255
255
The ''::part()'' pseudo-element only matches anything
256
256
when the <a>originating element</a> is a <a>shadow host</a> .
257
257
If the <a>originating element's</a> <a>shadow root's</a> <a>part element map</a>
258
- [=map/contains=] the specified <<ident>> ,
258
+ [=map/contains=] all of the specified <<ident>> s ,
259
259
''::part()'' matches the element or elements keyed to that <<ident>> .
260
260
Otherwise, it matches nothing.
261
261
@@ -268,15 +268,30 @@ Otherwise, it matches nothing.
268
268
''#the-button::part(label)'' .
269
269
</div>
270
270
271
- The <a>shadow-part pseudo-elements</a> can take additional pseudo-classes after them,
271
+ <div class="example">
272
+ Part names act similarly to classes:
273
+ multiple elements can have the same part name,
274
+ and a single element can have multiple part names.
275
+
276
+ A tabstrip control might have multiple elements
277
+ with <code> part="tab"</code> ,
278
+ all of which are selected by ''::part(tab)'' .
279
+
280
+ If a single tab is active at a time,
281
+ it can be specially indicated with <code> part="tab active"</code>
282
+ and then selected by ''::part(tab active)''
283
+ (or ''::part(active tab)'' , as order doesn't matter).
284
+ </div>
285
+
286
+ The ''::part()'' pseudo-element can take additional pseudo-classes after it,
272
287
such as ''x-button::part(label):hover'' ,
273
- but never match the <a>structural pseudo-classes</a>
288
+ but never matches the <a>structural pseudo-classes</a>
274
289
or any other pseudo-classes that match based on tree information
275
290
rather than local element information.
276
291
277
- The <a>shadow- part pseudo-elements</a> also can take additional pseudo-elements after them ,
292
+ The '':: part()'' pseudo-element can also take additional pseudo-elements after it ,
278
293
such as ''x-button::part(label)::before'' ,
279
- but never match additional <a>shadow- part pseudo-elements</a> .
294
+ but never match additional '':: part()'' s .
280
295
281
296
<div class=example>
282
297
For example,
0 commit comments