feat(playground): soften dark views and set the editor on the code background #330
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!330
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/playground-dark-polish"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #328: the playground still showed glaring pure white in the dark recipe and run sheet views, and its editor sat on the page background.
Renderer: an opt-in hook, no default change
--color-text-strong(headings, quantities) in dark mode now readsvar(--vp-c-text-1, oklch(100% 0 0)), the same pattern as the existing--vp-c-bgbackground hook.gram view --servestays pure white, and the VS Code preview already overrides--color-text-strongin its ownview.css.tests/dark-host-hooks.test.tslocks both fallbacks (#1a1a1a, pure white) so a change to the default rendering cannot slip in.Docs / playground
global.cssfeeds--vp-c-text-1: var(--sl-color-white)next to--vp-c-bg: the views take the site's chalk white (#f2efe8, 14.9:1 instead of ~17:1) wherever the docs show them.--gram-code-bg(the darker ground of the docs' code blocks) and its gutter--gram-code-chrome. No change in the light theme, where--gram-code-bgis the page background.contrast.test.tsnow covers the renderer's strong text (AA, under 15:1) and the editor's line numbers on the gutter.Checks
bun test: renderer 730 pass, docs 160 pass. Renderer rebuilt,dist/gram.csscarries the hook.