Post
Not really no. Scoping is nice in theory, but then you are either giving up SSR or duplicating a lot of style tags.
0 reposts1 like
That was a pain point, but native web has always been a pain point that catches up to userland. Now we have Declarative Shadow DOM (developer.mozilla.org/en-US/docs/W...) and <link rel="stylesheet"> to allow people to SSR custom elements with shared styles without increasing HTML payload size.
<link rel="stylesheet"> does cause styles to be duplicated in memory (not the payload), so a new standard that supports CSS Module Scripts will soon be normalized, which will share a single CSSStyleSheet instance across all roots that link it with <link> github.com/MicrosoftEdg...
The pull request for CSS Module Scripts in Safari is already approved by @rniwa.bsky.social.