janczizikow / sleek

:chart_with_upwards_trend: Sleek is a modern Jekyll theme focused on speed performance & SEO best practices
https://janczizikow.github.io/sleek/
MIT License
423 stars 638 forks source link

White flash when browsing theme #19

Closed victorbjorklund closed 6 years ago

victorbjorklund commented 6 years ago

Hi!

Thanks for a great theme. Not sure if this is a bug or something obvious that I missed. I changed the color of the menu from white to dark blue. Whenever I go to a new page in the site it flashes white for 0.3 sec before turning to the correct color. Tried with different browsers on different devices and I get the same result. Any idea how to fix it so that it doesn't always load the menu with a white flash (probably only noticeable then the menu is in another color than white)?

janczizikow commented 6 years ago

Hey @victorbjorklund, you can try running gulp critical (from the terminal in the directory of your project) to generate the critical.css. Just make sure you're running a server before using the command. Most likely old styles are still inlined in html, which is causing the flash of color.

janczizikow commented 6 years ago

Gonna close this for now, feel free to open a new issue in case you still have the problem.