Why Nostr? What is Njump?
2024-10-07 13:44:46

Sara Joy :happy_pepper: on Nostr: Finding it difficult to avoid FOUC-ing up (Flash Of Unstyled Content) when switching ...

Finding it difficult to avoid FOUC-ing up (Flash Of Unstyled Content) when switching out or adding in a linked stylesheet to the head via JS.

I thought normal JS scripts in the head would block render - and I suppose they do but then there's still a split second or more of no stylesheet while the switch is taking place and it rerenders.

Is there a way to make it less flashy without resorting to hacks like making html/body invisible until the last line of CSS is parsed?

#CSS #JavaScript #FOUC
Author Public Key
npub1jpylcq5e6mdcn7pdqq4ayknszevr9yakqrm8f2gvt0675w3rsdwql7yfwv