Skip to content

Fix Mermaid label contrast in dark mode - #6531

Merged
thomhurst merged 1 commit into
mainfrom
agent/fix-mermaid-dark-mode-contrast
Jul 31, 2026
Merged

Fix Mermaid label contrast in dark mode#6531
thomhurst merged 1 commit into
mainfrom
agent/fix-mermaid-dark-mode-contrast

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

  • restore Mermaid node-specific text colours in dark mode
  • darken the highlighted initializer label to meet WCAG AA contrast

Root cause

The global dark-mode paragraph rule overrode colours inherited by Mermaid labels. This changed highlighted node text to #cbd5e1, producing contrast as low as 1.05:1 on pastel backgrounds.

The Mermaid-specific rule now preserves inherited node colours. The orange initializer label increases from 3.46:1 to 6.66:1 contrast.

Validation

  • yarn build (docs)
  • git diff --check
  • contrast ratios checked for all three highlighted lifecycle nodes

Addresses discussion #6530.

Dark-mode paragraph styling overrides Mermaid node colors, making labels on pastel nodes unreadable.

Refs #6530
@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown

Greptile Summary

Updates the lifecycle documentation and dark-mode Mermaid styling to restore node-specific label colors and improve initializer-label contrast.

  • Changes the initializer node text color from #e65100 to the darker #9a3412.
  • Makes Mermaid node-label paragraphs inherit their node-specific text color in dark mode.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or non-blocking defects identified in the changed code.

The CSS selector is more specific than the global dark-mode paragraph rule and is scoped to Mermaid node labels, while the documentation color adjustment improves contrast without changing diagram behavior.

Important Files Changed

Filename Overview
docs/docs/writing-tests/lifecycle.md Darkens the highlighted initializer node label while retaining the existing diagram structure and styling.
docs/src/css/custom.css Adds a narrowly scoped dark-mode override so Mermaid node-label paragraphs inherit colors rather than receiving the global paragraph color.

Reviews (1): Last reviewed commit: "fix(docs): restore Mermaid label contras..." | Re-trigger Greptile

@thomhurst
thomhurst merged commit a1f8494 into main Jul 31, 2026
14 of 15 checks passed
@thomhurst
thomhurst deleted the agent/fix-mermaid-dark-mode-contrast branch July 31, 2026 17:25
This was referenced Aug 7, 2026
This was referenced Aug 8, 2026
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.

1 participant