Skip to content

Fix #2767: Use text.primary color for h1 headings in markdown blocks#2776

Open
cobyfrombrooklyn-bot wants to merge 1 commit intoRedocly:mainfrom
cobyfrombrooklyn-bot:fix-issue-2767
Open

Fix #2767: Use text.primary color for h1 headings in markdown blocks#2776
cobyfrombrooklyn-bot wants to merge 1 commit intoRedocly:mainfrom
cobyfrombrooklyn-bot:fix-issue-2767

Conversation

@cobyfrombrooklyn-bot
Copy link
Copy Markdown

H1 headings in markdown blocks incorrectly used colors.primary.main for their text color, while H2 used colors.text.primary. This made H1 headers appear in the primary/accent color (e.g. blue #32329f) instead of the standard text color (#333333), breaking visual consistency.

Changes

  • Changed h1 color in src/components/Markdown/styled.elements.tsx from colors.primary.main to colors.text.primary

Test

Added src/components/Markdown/__tests__/styled.elements.test.tsx that:

  • Verifies h1 references colors.text.primary
  • Verifies h2 references colors.text.primary
  • Verifies neither uses colors.primary.main
  • Fails without the fix, passes with it

Tested locally on macOS ARM (Apple Silicon). Full test suite passes (pre-existing snapshot failures unrelated to this change).

Fixes #2767

H1 headings in markdown blocks incorrectly used colors.primary.main
for their text color, while H2 used colors.text.primary. This made H1
headers appear in the primary/accent color instead of the standard
text color, breaking visual consistency.

Changed h1 color from colors.primary.main to colors.text.primary to
match h2 and other heading levels.

Added test to verify both h1 and h2 use colors.text.primary.

Fixes Redocly#2767
@cobyfrombrooklyn-bot cobyfrombrooklyn-bot requested a review from a team as a code owner February 24, 2026 09:41
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.

H1 in markdown block uses colors.primary.main instead of colors.text.primary

1 participant