3 ms·
Shadow DOM fixes CSS scoping with the caveat that it fixes CSS scoping. If want to allow a 3rd party to style inside of a shadow root CSS variables is the only
by MatthewPhillips 10y ago
Shadow DOM fixes CSS scoping with the caveat that it fixes CSS scoping. If want to allow a 3rd party to style inside of a shadow root CSS variables is the only current way. While this works, it's pretty painful to pass variables for each property you need to style.
We desperately need CSS @apply [1] which gives CSS something similar to sass mixins. So to theme inside of shadow boundaries you would pass @apply rules.
[1] https://tabatkins.github.io/specs/css-apply-rule/ https://tabatkins.github.io/specs/css-apply-rule/