Context
Docs are read for long stretches and theme preference matters more here than
anywhere else in the product. The requirement matching apps/web is zero flash
on load, which means the theme must be resolved before first paint.
Scope
- Reuse the app's
ThemeProvider approach: a blocking inline script sets the
class on <html> from stored preference or prefers-color-scheme before
paint.
- Add a theme toggle to the docs header with the same three states the app uses.
- Audit every docs surface in both themes: code blocks, callouts, tables,
sidebar, TOC, search dialog, badges.
- Verify AA contrast for body text, muted text, links, and code on every surface.
- Handle images that need a dark variant with a documented convention.
Acceptance criteria
Out of scope
- A high-contrast theme (DS-066 already covers the app; docs inherits later).
Spec: docs/dx_1/001_docs_site.md §5 · Depends on: DX-038
Context
Docs are read for long stretches and theme preference matters more here than
anywhere else in the product. The requirement matching
apps/webis zero flashon load, which means the theme must be resolved before first paint.
Scope
ThemeProviderapproach: a blocking inline script sets theclass on
<html>from stored preference orprefers-color-schemebeforepaint.
sidebar, TOC, search dialog, badges.
Acceptance criteria
throttled connection.
Out of scope
Spec:
docs/dx_1/001_docs_site.md§5 · Depends on: DX-038