top | item 34780970

(no title)

rossmohax | 3 years ago

Is it accurate to mentally model this feature as browser mounting/applying CSS not to the document, but to the arbitrary DOM element in it?

discuss

order

throwaway894345|3 years ago

I’m probably the wrong person to ask, but my mental model is that it scopes/isolated the CSS inside the component so it doesn’t affect elements elsewhere in the document but it also prevents CSS elsewhere in the document from affecting the elements in the component.

My outstanding question here is: how do people reuse components across sites with different themes? Do they have to pass styles across the shadow boundary via JS? Or do they just give up on cross-project reuse or theming?