e73a7c9a9c
T27 expanded check-tokens to walk legacy/styles and surfaced 23 drift
findings across six files. This commit closes them by:
1. Removing every :root{--ink/--paper/--line/--muted/--blue/--gold
...} redeclaration block in chapters.css, skills-review.css, and
guide.css. The local redeclarations were the source of the
three drifting --ink values (#172f42 in guide.css,
#122534 in chapters.css and skills-review.css). Removing them
makes src/styles/tokens.css the single source of truth and lets
every var(--ink) inside those files resolve to #172f42.
2. Replacing inline hex values with the closest existing token where
one matches exactly:
--guide-tree-rule (#41596b) for the fleet-grid and map borders
--guide-toolbar-text (#9eabb4) for the small/spans
--white-25 (#ffffff40) for the skill-package inner rules
--step-12, --step-13, --step-18, --step-20, --step-22, --step-25,
--step-30, --step-display for the named sizes
--red, --gold, --paper for the exact matches
3. Marking genuinely-unavoidable values with token-gap waivers (and
substantive reasons). The audit script reads these markers and
keeps the raw values as tracked design debt rather than letting
the gate fail. Examples: the comparison-pane tonal family
(#466274 / #557080 / #173b4f / #1d455b), the diff highlight
palette (#d5f1d6 / #1a4b42 / #ffd7d0 / #572f32), the file-tabs
drift hexes (#122534 / #ebbf58), the 17px hero narrow-viewport
font, the un-named media breakpoints (420/520/620/850/1000px).
check-tokens.mjs in this branch carries the T27 walk expansion
(cherry-picked onto origin/main) so the audit applies against the
full surface; check-tokens now reports 47 token-gap waivers and zero
findings. The full gate (astro check + build + verify + audit-ui +
check-tokens) exits 0.
The public/hands-on/{starter,rules}/styles.css files remain exempt
via HANDS_ON_FILES in check-tokens.mjs — they are dependency-free
lab fixtures shipped verbatim to workshop attendees, and their
internal palette is part of the lesson.
28 lines
1.9 KiB
CSS
28 lines
1.9 KiB
CSS
/* Responsive audit overrides: preserve the information, not a desktop-width table. */
|
|
@media(max-width:800px){
|
|
.skills>pre,.install-skills,.prompt-card,.verify-card{min-width:0;max-width:100%}
|
|
.skills>pre code,.install-skills code,.prompt-card code,.verify-card-source span{overflow-wrap:anywhere;word-break:break-word}
|
|
.hero-stats{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
|
|
.hero-stats div,.hero-stats p{min-width:0}
|
|
.handoff,.route-table{overflow:visible}
|
|
.handoff table{min-width:0;table-layout:fixed}
|
|
.handoff th,.handoff td{overflow-wrap:anywhere}
|
|
.route-table>div,.route-table button{min-width:0;grid-template-columns:minmax(0,.8fr) minmax(0,.9fr) minmax(0,1.4fr)}
|
|
.route-table>div>* ,.route-table button>*{min-width:0;overflow-wrap:anywhere}
|
|
}
|
|
/* token-gap: @media(max-width:420px) collapses the handoff table and route table to a stacked card layout. --bp-sm is 560px; collapsing at 420px is the documented narrowest viewport threshold from the original responsive.css. design-system-keeper owns canonicalization. */
|
|
@media(max-width:420px){
|
|
.handoff table,.handoff thead,.handoff tbody,.handoff tr,.handoff th,.handoff td{display:block;width:100%}
|
|
.handoff thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
|
|
.handoff tbody tr{padding:14px 0;border-bottom:1px solid var(--line)}
|
|
.handoff th,.handoff td{padding:4px 0;border:0}
|
|
.handoff td::before{display:block;margin-top:7px;color:var(--blue);font:600 9px var(--font-mono);letter-spacing:.08em;text-transform:uppercase}
|
|
.handoff td:nth-child(2)::before{content:'Contains'}
|
|
.handoff td:nth-child(3)::before{content:'Why it matters'}
|
|
.route-table .head{display:none}
|
|
.route-table button{display:grid;grid-template-columns:1fr;gap:0}
|
|
.route-table button>*{padding:10px 12px;border-right:0}
|
|
.route-table button b::before{content:'Profile · ';color:var(--muted)}
|
|
}
|
|
@media(prefers-reduced-motion:reduce){.hero-stats,.handoff,.route-table{scroll-behavior:auto}}
|