3
lorentz
5y

Is there a sane way to allow external styling of vanilla web components' shadow dom? Right now I do it by using 30 CSS variables, but I feel like there should be a better way.

Comments
  • 3
    We will transpile values in from remote calls in angular

    Since they dropped ::deep though, it's not that straightforward.
  • 0
    @SortOfTested vanilla. I don't even know what you're talking about. I only got back to web because I heard that now it isn't a PITA to do it without massive redundant frameworks doing the job of a proper STL.
  • 1
  • 1
    @SortOfTested That one is now deprecated, the new standard is ::part (and supposedly ::theme although I failed to find it on caniuse so it probably has worse browser support).
  • 0
    @Lor-inc
    Yep. Shadow dom is a complete shitshow at the moment. W3C and whatwg haven't been able to agree on anything with it, and it's resulting in features being added, removed, rescinded specs, etc.

    I'm personally ignoring it until the dust actually settles.
  • 1
    @SortOfTested I only care because this one looks like it's gonna pass. If it doesn't, I'll stick with passing shared styles as a single string and rely on optimizations for style elements with identical content.
  • 0
    @Lor-inc
    You should definitely care. It's just been a painful 6 years following this one. 🙂
Add Comment