4 ms·
I mean, the shadow DOM practically forces you to put the styles with the elements they style. If you're going to do that, there's nothing stopping you from just
by kerkeslager 4y ago
I mean, the shadow DOM practically forces you to put the styles with the elements they style. If you're going to do that, there's nothing stopping you from just exclusively using the style attribute in HTML, which would achieve the same result without the shadow DOM.
In my experience when I start running into problems with competing styles it's usually because I've not structured my CSS well, although admittedly, structuring your CSS well is pretty hard to do.
- benatkin 4y agoadoptedStylesheets will help with that. Already you can mix them in from any source, it’s just plain text. Also the styles may contain variables and those can be inherited. So the design can be shared even if you aren’t pulling in shared styles.