codyhouse / codyhouse-framework

A lightweight front-end framework for building accessible, bespoke interfaces.
https://codyhouse.co/
MIT License
1.16k stars 171 forks source link

Flash of unstyled page when using JS for CSS fallback #43

Closed richardwiggins closed 4 years ago

richardwiggins commented 4 years ago

Hi there, I'm getting a flash of the unstyled page both on local dev and on a live site when using the Javascript css var detection. Basically the css clearly isn't loading quick enough.

If I bypass this and just call the style.css normally the issue disappears. Not a solution really though as I do need the fallback.

Anyone else experienced this or know how to stop the delay?

You can see this on the live site at: https://ligtas.co.uk/

w3work commented 4 years ago

You need to update CodyFrame to minimum version 2.2.0. Here they reverted back to document.write() in index.html.

The previous code, like on your site, made this flickering on load/relaod the site. I found this big around a month ago and posted this to the team. So they relased a new bugfixed version.

richardwiggins commented 4 years ago

Awesome, thanks @w3work. That fixed it.