Skip to content

Resolve flash of light styles when using auto color mode

Scott de Jonge requested to merge 223205-automatic-dark-mode-flash-fix into master

What does this MR do and why?

Resolve flash of light styles when using auto color mode

Move root element class js to before styles are loaded

Changelog: fixed

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
CleanShot_2024-05-13_at_15.58.13 CleanShot_2024-05-13_at_15.59.01

How to set up and validate locally

  1. Set color mode to "Auto" in https://gdk.test:3443/-/profile/preferences
  2. Set OS appearance to "Dark"
  3. Load view with tabs e.g. MR https://gdk.test:3443/flightjs/Flight/-/merge_requests/4
  4. There shouldn't be a flash of light styles before page loads

Related to #223205 (closed)

Merge request reports