feat(ui): make code blocks distinct from comment background#2879
Merged
Conversation
Code blocks shared the gray-2 fill of the comment cards wrapping them, so they blended in. Bump the pre fill to gray-3 and border to gray-6. Generated-By: PostHog Code Task-Id: 0c9f803f-d5c2-4da1-b0d6-1cc318d563b2
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "fix(ui): make code blocks distinct from ..." | Re-trigger Greptile |
charlesvien
approved these changes
Jun 24, 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.
Problem
Code blocks rendered inside comment/finding bodies blended into the cards wrapping them. The shared
CodeBlockprimitive used agray-2fill — the same color as the PR comment card around it — with a faintgray-4border, so fenced code blocks were nearly indistinguishable from the surrounding comment.Changes
Before:

After:

<pre>fill fromgray-2togray-3and the border fromgray-4togray-6, so code blocks read as a distinct, slightly recessed panel.CodeBlockprimitive — PR comment threads, scout emission cards, and signal cards all benefit at once.gray-3/gray-6are mode-aware Radix steps, so light and dark mode both stay correct.How did you test this?
pnpm --filter @posthog/ui typecheck— passes.Automatic notifications
Created with PostHog Code