fix(docs): restore inline code contrast in light mode#3365
Merged
Conversation
Kramdown+Rouge tags inline `code` spans with `class="language-plaintext highlighter-rouge"`. The Rouge block-code override selector `.content code[class*="language-"]` was catching these spans and forcing `color: var(--gray-200)` (#C8CFDA, light gray) on a near-white `--bg-code-block` background (#F6F8FA) — nearly invisible in light mode. Scope the selector to `.content pre code[class*="language-"]` so it only matches code inside block `<pre>` elements. Inline code now falls back to `.content code`, which in light mode renders as `--text-code` (blue-600, #1A4DD9) on `--bg-code` (#FFFFFF) with a visible border — clear contrast, matching the site's existing design intent.
Sayt-0
approved these changes
Jul 1, 2026
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.
Inline
codespans likeopencode-zenandOPENCODE_API_KEYwere nearly invisible in light mode: light gray text (#C8CFDA) on a near-white background (#F6F8FA).Root cause: Kramdown+Rouge tags inline code with
class="language-plaintext highlighter-rouge". The Rouge block-code override selector.content code[class*="language-"]matched these spans and forced the low-contrast colours.Fix: Scope the selector to
.content pre code[class*="language-"]. Inline code now falls back to.content code, which in light mode renders as blue-600 (#1A4DD9) on white (#FFFFFF) with a visible border — the site's existing design intent. Dark mode and block code are unaffected.Testing: Go build ✓, custom linter ✓, go mod tidy ✓. CSS change only.