Skip to content

fix(docs): improved Mermaid diagrams' readablity - #58

Closed
tsdebug wants to merge 3 commits into
concile-dev:mainfrom
tsdebug:fix/mermaid-text-contrast
Closed

tsdebug wants to merge 3 commits into
concile-dev:mainfrom
tsdebug:fix/mermaid-text-contrast

Conversation

@tsdebug

@tsdebug tsdebug commented Oct 11, 2026

Copy link
Copy Markdown

Summary

Mermaid diagram text, borders, lines and arrowheads were very faint in both light and dark mode. The renderer only received background and foreground colors, so the colors it derived had low contrast.

This PR improves the diagrams’ readability while keeping their existing visual style and theme responsiveness.

What changed

  • Updated Mermaid to use the documentation theme colors for:
    • Diagram text
    • Connector lines
    • Arrowheads
    • Node borders
    • Node surfaces
    • Muted labels
  • Passes the docs theme tokens (muted, line, accent, surface, border) to the Mermaid renderer so diagrams follow the light and dark theme.
  • Adds a small .mermaid-diagram-scoped rule that gives edge labels (for example yes/no) an opaque background and foreground-colored text, so connector lines don't show through them.
  • Both changes are scoped to Mermaid diagrams and don't affect other SVGs on the site.

Result

Diagram labels and relationships are now easier to see at normal zoom in both light and dark mode, while preserving the distinction between primary text, muted labels, nodes, and connectors.

Mermaid diagrams in light mode

Mermaid diagrams in dark mode

Validation

  • Verified the affected diagrams locally in light mode.
  • Verified the affected diagrams locally in dark mode.
  • Confirmed that labels, borders, connector lines, and arrowheads are visible.
  • MDX generation passed.
  • Next.js route type generation passed.
  • TypeScript validation passed.
  • git diff --check passed.

Fixes #57

@vercel

vercel Bot commented Oct 11, 2026

Copy link
Copy Markdown

@tsdebug is attempting to deploy a commit to the Dibyajyoti's projects Team on Vercel.

A member of the Team first needs to authorize it.

@dbjpanda

Copy link
Copy Markdown
Contributor

Thanks for your contribution

@dbjpanda
dbjpanda enabled auto-merge (squash) October 13, 2026 15:02
@dbjpanda dbjpanda closed this Oct 13, 2026
auto-merge was automatically disabled October 13, 2026 15:02

Pull request was closed

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.

bug: Mermaid diagram text is barely visible in both light and dark mode.

2 participants