sampittko / gatsby-starter-intl-blog

Gatsby starter for creating an internationalized personal blog website
MIT License
2 stars 1 forks source link

Remove color flash from BackgroundColor component #7

Closed sampittko closed 4 years ago

sampittko commented 4 years ago

Describe the bug Component BackgroundColor which covers the whole viewport to keep the background color consistent in both modes (light and dark) loads sooner than dark mode is set which appears to be the reason of a quick flash on the first page load.

To Reproduce Steps to reproduce the behavior:

  1. Make sure that a website was loaded at least once on your machine
  2. Open new tab and load it in new session
  3. Quick flash appears if going to light mode

Expected behavior The only color that appears should be the one that current mode uses.

sampittko commented 4 years ago

Fixed by removing @apply bg-white inside tailwind.css that accidentally got there 😁✌🏼