Skip to content

fix(styles): use semantic colors for plan markdown styling#2901

Open
MattPua wants to merge 1 commit into
mainfrom
posthog-code/fix-plan-highlight-visibility-in-dark-mode
Open

fix(styles): use semantic colors for plan markdown styling#2901
MattPua wants to merge 1 commit into
mainfrom
posthog-code/fix-plan-highlight-visibility-in-dark-mode

Conversation

@MattPua

@MattPua MattPua commented Jun 24, 2026

Copy link
Copy Markdown
Member

TL;DR

Replace hardcoded rgba colors with semantic color variables in plan markdown styling to ensure consistent visibility and appropriate contrast in both light and dark modes.

Problem

Plan highlighting lacks proper contrast and visibility across different color schemes. The hardcoded rgba(0, 0, 0, ...) and rgba(255, 255, 255, ...) values don't adapt well to light and dark modes, resulting in unclear highlighting and jarring visual presentation.

Changes

Before:

CleanShot 2026-06-24 at 10 24 30@2x CleanShot 2026-06-24 at 10 24 40@2x

After

CleanShot 2026-06-24 at 10 22 59@2x CleanShot 2026-06-24 at 10 23 11@2x
  • Replace background: rgba(0, 0, 0, 0.2) with var(--blue-a5) for code inline background
  • Replace background: rgba(0, 0, 0, 0.25) with var(--blue-a3) for pre-formatted code block background
  • Replace border: 1px solid rgba(255, 255, 255, 0.2) with var(--blue-a6) for table cell borders
  • Replace border-left: 2px solid rgba(255, 255, 255, 0.3) with var(--blue-a6) for blockquote left border

How did you test this?

Visual inspection of plan markdown rendering in both light and dark modes to verify improved contrast and consistent visibility.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@greptile-apps

greptile-apps Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "chore(styles): use semantic color variab..." | Re-trigger Greptile

@MattPua MattPua marked this pull request as ready for review June 24, 2026 14:25
@MattPua MattPua requested review from a team and adamleithp June 24, 2026 14:25

@adamleithp adamleithp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm not sure if blue is on brand, I was trying to go with more Posthog.com stylin' ala @corywatilo

image.png

@MattPua

MattPua commented Jun 24, 2026

Copy link
Copy Markdown
Member Author

Hmm not sure if blue is on brand, I was trying to go with more Posthog.com stylin' ala @corywatilo

image.png

i found the styling originally there jarring to read considering the constrast difference, and how often its used in the plan.

plus on dark mode its basically non noticeable.

I agree about whether blue is the right color at all, but the plan was already blue so

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.

2 participants