Skip to content

fix(www): plain code blocks are readable in light mode - #8120

Merged
KATT merged 1 commit into
mainfrom
claude/plain-code-blocks-light-mode
Nov 18, 2026
Merged

KATT merged 1 commit into
mainfrom
claude/plain-code-blocks-light-mode

Conversation

@KATT

@KATT KATT commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Why

  • A code block without a language, such as a request or an error message, had near-white text on a white background in light mode.

What

  • Nothing highlights such a block, so its text took the typography plugin's own pre color, which is for a dark background.
  • .prose now sets every color of the plugin for both themes: the pre text and background, lead, captions and kbd. Before, any it didn't set kept a default meant for one theme.

Links

Alternatives considered

  • Highlighting blocks without a language as text: it fixes code blocks only, and leaves the other plugin defaults to leak the same way.

Testing

  • Regression check: the site sets every color of the typography plugin, so none is for one theme only in www/src/prose.test.ts fails without this change, listing the colors left out.
  • Checked by hand with the rule applied to a preview page: the text is dark in light mode and light in dark mode.

AI model

Claude, via Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_019Un67hQz9cZvbcHHkJ5eKL

A code block without a language isn't highlighted, so its text took the
typography plugin's own color, which is for a dark background. The site now
sets every color of the plugin for both themes, and a test checks that none
is left out.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019Un67hQz9cZvbcHHkJ5eKL
@KATT
KATT requested a review from a team as a code owner November 18, 2026 01:33
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
www Ready Ready Preview Nov 18, 2026 1:35am UTC
6 Skipped Deployments
Project Deployment Actions Updated
examples-next-minimal-starter Skipped Skipped Nov 18, 2026 1:35am UTC
examples-todomvc Skipped Skipped Nov 18, 2026 1:35am UTC
next-prisma-starter Skipped Skipped Nov 18, 2026 1:35am UTC
next-prisma-websockets-starter Skipped Skipped Nov 18, 2026 1:35am UTC
tanstack-start-sse-chat Skipped Skipped Nov 18, 2026 1:35am UTC
trpc-next-app-dir Skipped Skipped Nov 18, 2026 1:35am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The .prose styles add light and inverted values for additional typography variables. A Vitest test checks that .prose declares every gray-style typography variable.

Changes: Prose Typography Variables

Layer / File(s) Summary
Prose variables and coverage test
www/src/styles.css, www/src/prose.test.ts
The .prose rules add values for preformatted code, lead text, captions, keyboard keys, and keyboard shadows. The test checks that every gray-style typography variable is declared.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 84375

This change fixes unreadable plain code blocks in light mode by setting the remaining typography colors for both themes. The impact is limited to documentation-site styling, and it is easy to revert. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix for plain code blocks in light mode. The raw summary shows that .prose now sets the typography plugin's light and dark theme colors, including pre code colors, which covers…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the fix for plain code blocks in light mode. The raw summary shows that .prose now sets the typography plugin's light and dark theme colors, including pre code colors, which covers this fix. The title is specific and matches the main change. It uses the conventional commit prefix fix(www):, which is acceptable.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6c5b46e and 843758e.

Files selected for processing: 2

  • www/src/prose.test.ts
  • www/src/styles.css

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@pkg-pr-new

pkg-pr-new Bot commented Nov 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trpc/client

npm i https://pkg.pr.new/@trpc/client@8120

@trpc/next

npm i https://pkg.pr.new/@trpc/next@8120

@trpc/openapi

npm i https://pkg.pr.new/@trpc/openapi@8120

@trpc/react-query

npm i https://pkg.pr.new/@trpc/react-query@8120

@trpc/server

npm i https://pkg.pr.new/@trpc/server@8120

@trpc/tanstack-react-query

npm i https://pkg.pr.new/@trpc/tanstack-react-query@8120

@trpc/upgrade

npm i https://pkg.pr.new/@trpc/upgrade@8120

commit: 843758e

KATT commented Nov 18, 2026

Copy link
Copy Markdown
Member Author

E2E-tests (openapi-codegen) fails here for a reason that isn't this PR's: it changes only www/. The same check fails on other PRs (Cannot find name 'node:assert/strict'). Since TypeScript 7.1, types defaults to [], and CI's filtered install for that example doesn't pull @types/node in some other way. A fix is being handled separately.


Generated by Claude Code

@trpc-bot trpc-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sets every typography plugin color in .prose for both themes. Plain code blocks are now readable in light mode. The test fails without the fix and names the missing colors. kbd-shadows is a full color in plugin 0.5.20, so var(--border) is valid. The openapi-codegen failure is unrelated and not required.


Generated by Claude Code

@KATT
KATT added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit e57a644 Nov 18, 2026
36 of 38 checks passed
@KATT
KATT deleted the claude/plain-code-blocks-light-mode branch November 18, 2026 03:36
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 19, 2026

This branch was successfully deployed

1 active and 4 inactive deployments
Preview – www — 843758ee Deployed Nov 18, 2026 by vercel[bot]
Preview – next-prisma-starter — 843758ee Deployed Nov 18, 2026 by vercel[bot]
Preview – trpc-next-app-dir — 843758ee Deployed Nov 18, 2026 by vercel[bot]
Preview – examples-next-minimal-starter — 843758ee Deployed Nov 18, 2026 by vercel[bot]
Preview – examples-todomvc — 843758ee Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants