The preference of dark mode is stored in localStorage, this gets executed after the dom is ready and after which the required attribute is added to the body and the CSS kicks in. On slower connections this causes a flash of colors where it first loads with different style and then switches to the preferred style.
This can be emulated on local with fast or slow 3g network throttling -
Bug Description
The preference of dark mode is stored in localStorage, this gets executed after the dom is ready and after which the required attribute is added to the body and the CSS kicks in. On slower connections this causes a flash of colors where it first loads with different style and then switches to the preferred style.
This can be emulated on local with fast or slow 3g network throttling -
https://user-images.githubusercontent.com/2931091/187685189-f8182a2c-5f1a-4bba-b763-3c00000b9495.mp4
Expected Behaviour
Page loads with preferred style instead of changing the style after load,
Steps to reproduce
Screenshots
Additional context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry