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.
20 lines
1.9 KiB
CSS
20 lines
1.9 KiB
CSS
.rs-foldable-heading { position: relative; }
|
|
.reading .rs-foldable-heading { padding-inline-start: 4px; }
|
|
.reading .rs-heading-toggle { inset-inline-start: -24px; }
|
|
.live-writer .rs-heading-toggle { top: .7em; }
|
|
.rs-heading-toggle { position: absolute; inset-inline-start: -30px; top: 0; width: 28px; height: 28px; padding: 6px; border: 0; border-radius: var(--rs-control-radius); color: var(--rs-text-dim); background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
|
|
.rs-heading-toggle:hover, .rs-heading-toggle:focus-visible { color: var(--rs-text); background: var(--rs-bg-active); }
|
|
.rs-heading-toggle:focus-visible { outline: 1px solid var(--rs-focus); outline-offset: 1px; }
|
|
.rs-heading-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
.rs-heading-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
|
|
.rs-heading-collapsed::after { content: " …"; color: var(--rs-text-dim); font-weight: normal; }
|
|
.live-writer .cm-foldPlaceholder { border: none; background: transparent; color: var(--rs-text-dim); cursor: pointer; padding: 0 .3em; }
|
|
.reading [hidden] { display: none !important; }
|
|
.reading .md-footnote-ref, .live-writer .writer-footnote-ref { font-size: .75em; vertical-align: super; line-height: 0; }
|
|
.live-writer .writer-footnote-definition { color: var(--rs-text-dim); font-size: .85em; }
|
|
.reading .md-footnotes { margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--rs-border); font-size: .9em; }
|
|
.reading .md-footnotes li { padding-inline-start: .3em; }
|
|
.reading .md-footnotes li > p:last-of-type { display: inline; }
|
|
.reading .md-footnote-back { margin-inline-start: .4em; }
|
|
.reading .md-footnote-ref a:focus-visible, .reading .md-footnote-back:focus-visible { outline: 1px solid var(--rs-focus); outline-offset: 3px; border-radius: var(--rs-control-radius); }
|