Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css loading times. 200ms+ #177

Open
zahnno opened this issue Nov 21, 2016 · 2 comments
Open

css loading times. 200ms+ #177

zahnno opened this issue Nov 21, 2016 · 2 comments

Comments

@zahnno
Copy link

zahnno commented Nov 21, 2016

Hi, I'm running into an issue with loading my styles at an efficient pace. I'm using skel.init to initialize my breakpoints, styles, aswell as a few containers. On page load, no styles are applied and the page is viewed in raw html. The styles are later added after about 200ms, which is quite noticable. Is there a fix for this?

@wellu
Copy link

wellu commented Dec 19, 2016

I think the whole logic of using JS to select proper stylesheet is flawed as it depends eg. on jQuery to be loaded first.

Using proper media queries, and ditching whole init at least on breakpoints part, is the way to go.

@ghost
Copy link

ghost commented Jan 12, 2017

FWIW I found the following port of Strata by @digitalcraftsman to be quite fast in masking any FOUC: https://github.com/digitalcraftsman/hugo-strata-theme.

EDIT: Upon closer inspection the FOUC is probably mostly caused due to script blocking when jQuery and friends are loaded in the document HEAD. Move them to the bottom of the body to improve the UX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants