Skip to content

UI 🧹 consolidate colours into CSS variables #9986

Open
rosieyohannan wants to merge 3 commits intomainfrom
DOCSS-2002-dark-mode-prep
Open

UI 🧹 consolidate colours into CSS variables #9986
rosieyohannan wants to merge 3 commits intomainfrom
DOCSS-2002-dark-mode-prep

Conversation

@rosieyohannan
Copy link
Contributor

dark mode preparation

Converted 92 hard-coded colour values to CSS variables across the UI codebase to prepare for dark mode implementation. This systematic refactoring creates a unified colour system that will enable easy theme switching.

Changes:

  • Reorganised vars.css with clear sections (base palette vs semantic tokens)
  • Fixed admonition colour mismatches between definitions and usage
  • Consolidated Tailwind @theme colors to reference vars.css
  • Converted all hard-coded colors in doc.css (28), toc.css (2), tabs.css (3)
  • Made syntax highlighting theme-aware (highlight.css, shiki.css)
  • Added color-scheme metadata to base.css
  • Fixed undefined --spacing variable (pre-existing bug)
  • Created comprehensive COLOR_SYSTEM.md documentation

The codebase now has 185 CSS variables organized into:

  • Base color palette (36 variables)
  • Semantic tokens for light theme (80+ variables)
  • Syntax highlighting colors (17 variables)
  • Font, dimension, and z-index properties

All changes maintain visual parity with the current design.

…paration

Converted 92 hard-coded color values to CSS variables across the UI codebase to prepare for dark mode implementation. This systematic refactoring creates a unified color system that will enable easy theme switching.

Changes:
- Reorganized vars.css with clear sections (base palette vs semantic tokens)
- Fixed admonition color mismatches between definitions and usage
- Consolidated Tailwind @theme colors to reference vars.css
- Converted all hard-coded colors in doc.css (28), toc.css (2), tabs.css (3)
- Made syntax highlighting theme-aware (highlight.css, shiki.css)
- Added color-scheme metadata to base.css
- Fixed undefined --spacing variable (pre-existing bug)
- Created comprehensive COLOR_SYSTEM.md documentation

The codebase now has 185 CSS variables organized into:
- Base color palette (36 variables)
- Semantic tokens for light theme (80+ variables)
- Syntax highlighting colors (17 variables)
- Font, dimension, and z-index properties

All changes maintain visual parity with the current design. Build passes cleanly with no CSS errors.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@rosieyohannan rosieyohannan requested review from a team as code owners February 11, 2026 12:35
Fixed pre-existing stylelint warnings to improve code quality and consistency:

- Updated rgba() to modern rgb() notation with percentage alpha values
- Changed hex color #FFFFFF to shorter form #FFF
- Renamed CSS variables to use consistent kebab-case naming:
  - --link_hover-font-color → --link-hover-font-color
  - --link_unresolved-font-color → --link-unresolved-font-color
  - --scrollbar_hover-thumb-color → --scrollbar-hover-thumb-color
  - --navbar_hover-background → --navbar-hover-background
  - --navbar-menu_hover-background → --navbar-menu-hover-background
- Replaced deprecated word-wrap with overflow-wrap

All changes are cosmetic and maintain visual parity. Build passes with zero lint errors.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@rosieyohannan rosieyohannan changed the title UI 🧹 consolidate colors into CSS variables UI 🧹 consolidate colours into CSS variables Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant