2 ms·
Reading the MDN documentation for parts, how are they different from classes?
by xigoi 5y ago
Reading the MDN documentation for parts, how are they different from classes?
- claviska 5y 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...