fix: align light theme with modern GitHub for visible diff highlights#387
Merged
tomasz-tomczyk merged 1 commit intomainfrom Apr 29, 2026
Merged
fix: align light theme with modern GitHub for visible diff highlights#387tomasz-tomczyk merged 1 commit intomainfrom
tomasz-tomczyk merged 1 commit intomainfrom
Conversation
Closes #384. The light theme used low-alpha rgba overlays for diff highlights, which visually rendered as near-white and made additions/deletions hard to see. Switch to opaque Primer v8 values (#dafbe1, #aceebb, #ffebe9, #ffcecb) so highlights are perceptible against the page background. Also align the rest of the editor's light tokens to current Primer v8: - Editor surfaces (#fafafa -> #ffffff, card/elevated/gutter to GH greys) - Editor fg (#24292f -> #1f2328, muted to #59636e) - hljs syntax tokens (keyword #cf222e, comment #59636e, etc.) — the inline hljs theme had drifted from upstream github.css and from current Primer; this is what github.com ships today. Three small accessibility-driven divergences from GH so we still pass the axe WCAG AA test that GH itself fails on these spots: - hljs built_in #953800 instead of #e36209 - Deletion-row gutter line numbers darkened to #1f2328 - hljs keyword/name/comment groups darkened to #1f2328 when nested inside .diff-word-del Dark theme (Tokyo Night) untouched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged
3 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #387 +/- ##
==========================================
+ Coverage 66.56% 66.59% +0.03%
==========================================
Files 19 19
Lines 8176 8176
==========================================
+ Hits 5442 5445 +3
+ Misses 2311 2309 -2
+ Partials 423 422 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #384.
Summary
#dafbe1,#aceebb,#ffebe9,#ffcecb). The faint highlights reported in Lacking contrast in light mode #384 were technically WCAG AA compliant but visually washed-out — the rgba overlays rendered as near-white on the page bg.github.css(2021) and from current Primer.hljs-built_indarkened to#953800; deletion-row gutter line numbers and.hljs-* > .diff-word-delgroups darkened to#1f2328.See also: tomasz-tomczyk/crit-web#138 (parity mirror).
Review
Test plan
gofmt -l .— cleangolangci-lint run ./...— 0 issuesgo test -race ./...— passe2e/tests/accessibility.spec.ts --project=git-mode— light-theme color-contrast and critical-violations tests PASS (dark-theme test fails pre-existing, unrelated to this change)🤖 Generated with Claude Code