How to get rid of FOUC (flash of unstyled content) when styling web components?

Viewed 380

I've started using vanilla web components in my side projects, but styling these things feels quite hacky sometimes. On top of that, when I import an external stylesheet into a component, there is a flash of unstyled content that I would like to get rid of. I've found a few workarounds, but they are not too "elegant". Apparently, using declarative shadow dom solves this issue, but it's still unsupported on all non-chromium browsers, and it could still very well go the way of html imports (or the dodo).

0 Answers
Related