summaryrefslogtreecommitdiff
path: root/devdocs/html/global_attributes%2Fpart.html
blob: d036bcfe141b19e13d6b71784b97410c2a1a53ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<header><h1>part</h1></header><div class="section-content">
<p>The <code>part</code> <a href="../global_attributes">global attribute</a> contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/::part"><code>::part</code></a> pseudo-element.</p> <p>See our <a href="https://mdn.github.io/web-components-examples/shadow-part/" target="_blank">Shadow part example</a> for a usage example.</p>
</div>
<h2 id="specifications">Specifications</h2>
<div class="_table"><table class="standard-table">
<thead><tr><th scope="col">Specification</th></tr></thead>
<tbody><tr><td><a href="https://drafts.csswg.org/css-shadow-parts/#part-attr">CSS Shadow Parts <br><small># part-attr</small></a></td></tr></tbody>
</table></div>
<h2 id="browser_compatibility">Browser compatibility</h2>
<div class="_table"><table>
<thead>
<tr id="bct-browser-type">
<th></th>
<th colspan="6">Desktop</th>
<th colspan="6">Mobile</th>
</tr>
<tr id="bct-browsers">
<th></th>
<th>Chrome</th>
<th>Edge</th>
<th>Firefox</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari</th>
<th>WebView Android</th>
<th>Chrome Android</th>
<th>Firefox for Android</th>
<th>Opera Android</th>
<th>Safari on IOS</th>
<th>Samsung Internet</th>
</tr>
</thead>
<tbody><tr>
<th><code>part</code></th>
<td class="bc-supports-yes">73</td>
<td class="bc-supports-yes">79</td>
<td class="bc-supports-yes">72</td>
<td class="bc-supports-no">No</td>
<td class="bc-supports-yes">60</td>
<td class="bc-supports-yes">13.1</td>
<td class="bc-supports-yes">73</td>
<td class="bc-supports-yes">73</td>
<td class="bc-supports-yes">79</td>
<td class="bc-supports-yes">52</td>
<td class="bc-supports-yes">13.4</td>
<td class="bc-supports-yes">11.0</td>
</tr></tbody>
</table></div>
<h2 id="see_also">See also</h2>
<div class="section-content"><ul> <li>All <a href="../global_attributes">global attributes</a>.</li> </ul></div><div class="_attribution">
  <p class="_attribution-p">
    &copy; 2005&ndash;2023 MDN contributors.<br>Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.<br>
    <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part" class="_attribution-link">https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part</a>
  </p>
</div>