NextJS – body background colour resets on refresh

I have a next app set up with styled-components, and a global style config (also from sc) which contains a dark colour for the body background

body {
  background-color: #1b1b1b;

However, whenever I refresh the page, the background briefly flashes white, before becoming black again after the page has been painted – this does not happen with routing using next/router. Any ideas on how to remedy this?

Source: CSS – Stack Overflow

November 23, 2021
Category : News
Tags: css | next.js | reactjs | styled-components

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.