Skip to content

fix: tone code spans and blocks down to body brightness - #62

Merged
stanlyzoolo merged 1 commit into
mainfrom
fix/code-text-body-brightness
Aug 4, 2026
Merged

fix: tone code spans and blocks down to body brightness#62
stanlyzoolo merged 1 commit into
mainfrom
fix/code-text-body-brightness

Conversation

@stanlyzoolo

Copy link
Copy Markdown
Owner

Inline code and code blocks rendered in Emphasis (#F2F3F5) on the Surface plate. That role is meant to peak a few times per frame, and a README spends dozens of code spans per screen — every literal was the loudest thing in the panel.

The plate alone marks a literal, so the text drops to the body Text role (#A8ADB8). Same rule, stated in two panels, changed in all four places:

  • readme inline code (cfg.Code.Color)
  • readme code block, chroma path — the Text token only, syntax accents untouched
  • readme code block, Ascii/NO_COLOR fallback (cfg.CodeBlock.Color)
  • card changelog mdCode plate (render.go)

Tests: updated the role assertions in readme_style_test.go, plus two gaps closed — the Ascii-fallback CodeBlock.Color was never pinned (a mutant keeping Emphasis there survived the suite), and TestChangelogBlockIndentAndCodePlate checked only the background, now also the foreground role. All four production edits mutation-checked: each revert goes red.

Docs: CLAUDE.md and docs/design/readme-pipeline.md carried the old rule with its rationale; both now record why Emphasis overshot.

Inline code and code blocks in the readme panel and the card's
changelog rendered in Emphasis (#F2F3F5) on the Surface plate — the
brightest text role, spent dozens of times per screen, which made
every literal the loudest thing in the panel. The plate alone is what
marks a literal, so the text now stays at the body Text role in all
three render paths (glamour inline/chroma/Ascii fallback) and the
changelog's mdCode plate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@stanlyzoolo
stanlyzoolo merged commit a1cb49f into main Aug 4, 2026
3 checks passed
@stanlyzoolo
stanlyzoolo deleted the fix/code-text-body-brightness branch August 4, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant