4 ms·
If you’re using a shadow root, look into CSS Custom Properties which poke through it and the HTML part attribute as well as its corresponding CSS :part() selec
by claviska 4y ago
If you’re using a shadow root, look into CSS Custom Properties which poke through it and the HTML part attribute as well as its corresponding CSS :part() selector.
- xigoi 4y agoReading the MDN documentation for parts, how are they different from classes?
- claviska 4y agoThey are both DOMTokenLists so parts look a lot like classes. The difference is parts are used in a shadow root to expose internal elements for styling. I’ve written a bit about CSS parts here: https://www.abeautifulsite.net/posts/when-to-create-css-parts/ https://www.abeautifulsite.net/posts/when-to-create-css-part...