News for hackers. Stuff that matters.
Re:HTML with Superpowers: An Introduction to Web Components by Keithamus on Wednesday January 11, 2023 @02:36AM (#34336057)
That’s what CSS parts and slots are for. Your component can style its own boundaries, provide parts to allow customisation, and use slots to inject components that are styled from outside (be it another ShadowDOM or the light DOM)
Re:HTML with Superpowers: An Introduction to Web Components by danielvaughn on Wednesday January 11, 2023 @05:19AM (#34336939)
Yep, though what I’m getting at is that those slots/parts better give you near-infinite flexibility. Because if you encounter a scenario where the slots don’t provide what you need, then you’re screwed.

Source: I fought with Ionic code for months over this. Really soured me on native encapsulation, but I see the benefits still. I just think it has to be approved very very very carefully.