[Repost] Death to the shadow DOM!
danq.me·4d
🧩Web Components
Preview
Report Post

Skip to content

This is a repost promoting content originally published elsewhere. See more things Dan’s reposted.

A common rebuttal I get to this…

What about when you want to keep global styles out of your component, like with a third-party widget that gets loaded on lots of different pages?

I kind-of sort-of see the logic in that. But I also think wanting your component to not look like a cohesive part of the page its loaded into is weird and unexpected.

I so-rarely disagree with Chris on JavaScript issues, but I think I kinda do on this one. I fully agree that the Shadow DOM is usually a bad idea and its encapsulation concept encourages exactly the …

Similar Posts

Loading similar posts...