Skip to content

docs(spec): plan #4745 Map the docs site theme to the design tokens - #7255

Merged
dan-petty merged 2 commits into
mainfrom
feat/4745-build-the-docs-site-theme-from
Nov 26, 2026
Merged

dan-petty merged 2 commits into
mainfrom
feat/4745-build-the-docs-site-theme-from

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

The docs site builds with Zensical since #5183, and its palette, fonts, code colors and favicon do not come from the design tokens of #4735. This change maps the Zensical theme variables to the token variables in one hand-written file that holds no color literal, adds a docs dark token file for the slate scheme, loads the three Source faces through the Google Fonts css2 API, and gives the code blocks, the focus outline, the breakpoints and the captions the rules of the design spec. The color literal rule and the constructs row now cover the docs theme tree, and the Docs Site Build checks the layout of the built site in both schemes at two widths.

Plans #4745

Change: openspec/changes/4745-build-the-docs-site-theme-from/

devops-cli-service Bot and others added 2 commits November 26, 2026 14:12
An independent review found two faults that give a wrong result and one
group that breaks an owner rule:

- The theme sets data-md-color-scheme on the body element, so the selector
  :root[data-md-color-scheme="slate"] matched no element and the dark
  scheme would show the light tokens. The plan uses the attribute selector,
  and the map of the theme variables is under the two scheme selectors.
- The implement Job has no Style Dictionary, and the job Design Tokens
  compares bytes. The docs dark config follows dark-explicit.json, and the
  Job writes the output as a byte copy of tokens-dark-explicit.css with its
  selector line replaced.
- The headless check stays, with no install on the runner: Playwright and
  axe-playwright-python come from the docs group of uv.lock, the script
  starts the Google Chrome of the runner image, and axe-core gives the
  contrast of each text pair.

Also: Source Serif 4 on the reading text with the sizes of DESIGN.md, no
test of a zensical.toml value, the new cases in the modules of tests/design
that the job Design Tokens runs, and the corrected cited lines.
@dan-petty
dan-petty force-pushed the feat/4745-build-the-docs-site-theme-from branch from a3610b4 to cc723d8 Compare November 26, 2026 14:13
@dan-petty

Copy link
Copy Markdown
Owner

Vetted and revised on 2026-11-26.

An independent review found two faults that give a wrong result and one group that breaks an owner rule. The revision (commit docs(spec): correct the selector and the checks of plan #4745):

  • The theme sets data-md-color-scheme on the body element (zensical_ui/templates/base.html:123). The selector :root[data-md-color-scheme="slate"] of the first plan matched no element, so the dark scheme would show the light tokens and no planned check would fail. The plan now uses [data-md-color-scheme="slate"], and the map of the theme variables is under the two scheme selectors.
  • The implement Job has no Style Dictionary, and the job Design Tokens compares bytes. The docs dark config now follows design/sd/dark-explicit.json, and the Job writes the output as a byte copy of tokens-dark-explicit.css with its selector line replaced.
  • The headless check of the issue stays, with no install on the runner: playwright 1.65.2 and axe-playwright-python 0.1.9 come from the docs group of uv.lock, the script starts the Google Chrome of the runner image (channel="chrome"), and axe-core gives the contrast of each text pair. The job limit goes from 5 to 10 minutes.
  • Also: Source Serif 4 on the reading text with the sizes of docs/DESIGN.md, no test of a zensical.toml value, the new cases in the tests/design modules that Design Tokens runs, and corrected cited lines.

Decisions in the revision, for your judgement: theme.font = false with one font request of the theme CSS (the theme would else load the faces twice); the check fails each text pair under 4.5:1, also large text; axe-core has the license MPL-2.0 and is used unchanged as a check tool.

Risk that stays: the implement Job cannot run a browser, so the first proof of group 6 is the job Docs Site Build of its pull request. The theme has lighter text variants that the map does not set, so that first run can fail on a contrast finding and need one more round.

@dan-petty
dan-petty merged commit 451b32e into main Nov 26, 2026
26 checks passed
@dan-petty
dan-petty deleted the feat/4745-build-the-docs-site-theme-from branch November 26, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/spec type/docs Type docs: a change to the documents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant