Skip to content

feat: add dark mode

Scott de Jonge requested to merge sdejonge-dark-mode into main

Description

Adds dark mode support to design.gitlab.com by toggling gl-dark class on root <html> element.

Note: control to toggle color mode and store current selected mode is not in-scope for this change. This introduces the initial design token usage to allow us to iterate on content (i.e. images) before publicly exposing dark mode.

Local validation

  1. Pull down branch or view review app
  2. Add gl-dark class to root <html> element
    1. See screenshot below for DevTools, or
    2. Add bookmarklet javascript:(function() { document.documentElement.classList.toggle('gl-dark'); })();
  3. Note sidebar link states :hover, :focus, :active
  4. Note sidebar logo states :hover, :focus, :active
  5. Note component overview cards /components/overview
  6. Note admonition styles /product-foundations/design-tokens-using

CleanShot_2024-06-28_at_16.48.35_2x

Screenshots

CleanShot_2024-07-29_at_15.06.46

Edited by Scott de Jonge

Merge request reports

Loading