Give themes named color roles, theme data files, and file format 3
Phase 5a-1 and 5a-2. - roles.ts names 51 color roles. One derivation rule fills the roles that a theme does not give, for all themes. tokens.css keeps only the root defaults, without theme blocks. - Each built-in theme is one data file in src/lib/theme/themes/. No code outside the theme data names a theme ID. characterThemes.ts is gone. - New roles: link, focus, on-accent, highlight, scrim, the syntax roles, and 16 terminal (ANSI) roles. Stray colors in components use the roles. - contrast.ts checks each theme against the readability rules of docs/ui-color.md. The tests mark the known palette failures as todo, and a second test fails when a known failure starts to pass. - Theme files use schema 3 with a mode and an optional built-in base. A short file gets the missing colors and fonts from the base. Schema 1 and 2 files still import. Old syntax names convert on import. - Docs: ui-color.md, plugin-development.md (theme tokens), ui-design.md, guides/themes.md, and UI-041 and UI-042 in design-decisions.md. The applied colors stay the same for every built-in theme, except three small changes: the conflict line uses the warn color, the Write highlight uses the highlight role, and two dialog backdrops use the scrim role. pnpm check passes. pnpm test: 447 pass, 31 todo, 0 fail. Full smoke suite: 93 passed, 2 known. appearance/palettes read the old syntax names and passed 3 of 3 times after the fix. workspace/manageTemplates failed one time and passed on retry.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
.reading > :first-child { margin-top: 0; }
|
||||
.reading p { margin: 0 0 .75em; white-space: pre-line; }
|
||||
.reading strong { font-weight: 600; color: var(--rs-text-strong); }
|
||||
.reading a { color: var(--rs-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
|
||||
.reading a { color: var(--rs-link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
|
||||
.reading a:hover { color: var(--rs-accent-2); }
|
||||
.reading hr { border: 0; border-top: 1px solid var(--rs-border); margin: 2em 0; }
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
.reading .md-properties summary { padding: 9px 12px; cursor: pointer; }
|
||||
.reading .md-properties summary:hover { color: var(--rs-text-strong); }
|
||||
.reading .md-properties pre { margin: 0; padding: 12px; border: 0; border-top: 1px solid var(--rs-border); border-radius: 0 0 6px 6px; white-space: pre-wrap; }
|
||||
.reading mark { background: color-mix(in srgb, #edc65b 30%, transparent); color: inherit; border-radius: 2px; }
|
||||
.reading mark { background: color-mix(in srgb, var(--rs-highlight) 30%, transparent); color: inherit; border-radius: 2px; }
|
||||
.reading .md-inline-math { font-family: var(--rs-font-mono); font-style: italic; }
|
||||
.reading .md-inline-comment { display: none; }
|
||||
.reading:not(.cm-content) :is(p, h1, h2, h3, h4, h5, h6):not(td *, th *) { position: relative; }
|
||||
|
||||
Reference in New Issue
Block a user