Skip to content

#93 Add light theme support to docs site - #146

Merged
dleshchev merged 2 commits into
mainfrom
ccrozier-docs-light-theme
Jun 11, 2026
Merged

dleshchev merged 2 commits into
mainfrom
ccrozier-docs-light-theme

Conversation

@chloecrozier

@chloecrozier chloecrozier commented Jun 10, 2026 •

Copy link
Copy Markdown
Member

Closes #93

Summary

There was already a light mode option since this issue was originally made, but updating it with a small bug fix noticed by greptile.

  • Default theme follows OS prefers-color-scheme; manual toggle persists via Material __palette shared with the landing page
  • Mirror NVIDIA branding in extra.css for the default scheme; landing page uses matching tokens and navbar toggle

Test plan

  • mkdocs build --strict
  • Toggle persistence across landing ↔ MkDocs pages
  • Chrome, Firefox, Safari

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
@chloecrozier chloecrozier changed the title Add light theme support to docs site #93 Add light theme support to docs site Jun 10, 2026
@chloecrozier
chloecrozier requested a review from dleshchev June 10, 2026 18:25
@greptile-apps

greptile-apps Bot commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds light-theme support across the docs site by introducing prefers-color-scheme-aware defaults, a manual toggle button on the landing page, and NVIDIA-branded light tokens in both extra.css and index.html, with persistence via MkDocs Material's __palette localStorage key.

  • mkdocs.yml: Palette order is now light-first with media queries; palette indices (0 = default/light, 1 = slate/dark) are in sync with PALETTE_ENTRIES in index.html, so theme persistence is consistent across the landing page and Material-rendered pages.
  • docs/index.html: A head IIFE applies the stored or OS-inferred theme before first paint; an inline body script immediately sets the correct aria-label on the toggle button (second commit addresses the previous P2 concern); the applyTheme helper persists a well-formed __palette object that Material can consume directly.
  • docs/stylesheets/extra.css: All existing [data-md-color-scheme="slate"] blocks are mirrored for [data-md-color-scheme="default"], covering typography, links, code, tables, nav, buttons, and admonitions without removing any dark-mode rules.

Confidence Score: 5/5

Safe to merge — purely additive CSS and JS changes to the docs site with no impact on the core library.

All three files contain straightforward presentational changes. The __palette persistence format is consistent between mkdocs.yml and index.html. Both commits carry DCO sign-offs and follow the required #<issue> - <title> format. The previously flagged aria-label issue on light first-load is addressed by the second commit.

No files require special attention.

Important Files Changed

Filename Overview
docs/index.html Adds OS-preference IIFE, per-theme CSS token blocks, and a theme-toggle button; __palette persistence correctly mirrors the updated mkdocs.yml palette indices (0=light/default, 1=dark/slate).
docs/stylesheets/extra.css Adds [data-md-color-scheme="default"] token blocks, typography, link, code, table, nav, button, admonition, and tab-dropdown overrides mirroring the existing slate section; no slate rules were removed.
mkdocs.yml Palette order swapped to light-first with media queries; icons and toggle names updated to match; index 0=default (light), 1=slate (dark) matches PALETTE_ENTRIES in index.html.

Reviews (2): Last reviewed commit: "#93 - Fix theme toggle aria-label on lig..." | Re-trigger Greptile

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
@chloecrozier
chloecrozier requested a review from RamyaGuru June 10, 2026 18:51
@dleshchev
dleshchev merged commit 30503c2 into main Jun 11, 2026
3 checks passed
dleshchev pushed a commit that referenced this pull request Jun 11, 2026
Replace hand-maintained index.html with snippet-driven index.md, Material home template, and shared design tokens.

Clean replay of PR #147 on top of current main after PR #146 landed the light-theme work separately.

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
chloecrozier added a commit that referenced this pull request Jun 11, 2026
* #93 - add light theme support to docs site

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>

* #93 - Fix theme toggle aria-label on light first load

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>

---------

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
dleshchev added a commit that referenced this pull request Jun 11, 2026
* #145 - Auto-build landing page from MkDocs snippets

Replace hand-maintained index.html with snippet-driven index.md, Material home template, and shared design tokens.

Clean replay of PR #147 on top of current main after PR #146 landed the light-theme work separately.

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>

* #145 - Address landing page review follow-ups

Preserve the merged landing copy updates, make the header respond to light and dark themes, keep the logo and header title styling consistent, and use the full DAQIRI title in the generated docs header.

Signed-off-by: dleshchev <dleshchev@nvidia.com>

---------

Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
Signed-off-by: dleshchev <dleshchev@nvidia.com>
Co-authored-by: Chloe Crozier <40836363+chloecrozier@users.noreply.github.com>
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.

Add light theme support to docs site (toggle + OS preference detection)

2 participants