Skip to content

feat(docs): add horizontal scroll + zoom interaction for mermaid flowcharts#135

Merged
JusterZhu merged 1 commit into
mainfrom
docs/core-execution-flow
Jun 21, 2026
Merged

feat(docs): add horizontal scroll + zoom interaction for mermaid flowcharts#135
JusterZhu merged 1 commit into
mainfrom
docs/core-execution-flow

Conversation

@JusterZhu

Copy link
Copy Markdown
Collaborator

Summary

The Core-flow page contains 11 wide horizontal mermaid flowcharts that were being squished into the content column, making text unreadable. This PR adds CSS to enable horizontal scrolling and better interaction.

Changes

/* - Enable overflow-x: auto on .docusaurus-mermaid-container */
/* - Let SVGs keep natural width (min-width: 600px) */
/* - Styled scrollbar for desktop */
/* - Subtle hover shadow for visual feedback */

Before/After

  • Before: flowchart SVG compressed to container width, text too small to read
  • After: horizontal scrollbar appears, SVG keeps natural width, users can scroll horizontally or scale browser to see full diagram

…charts

The Core-flow page has 11 wide horizontal mermaid flowcharts that
were squished into the content column, making them unreadable.

- Set .docusaurus-mermaid-container to overflow-x: auto
- Let SVG keep natural width (min-width: 600px)
- Add styled scrollbar for desktop
- Subtle hover shadow for visual feedback

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 21, 2026 05:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Improves readability of wide Mermaid flowcharts in the Docusaurus docs by adjusting the Mermaid container styling to allow horizontal scrolling and better visual interaction cues.

Changes:

  • Added styles for .docusaurus-mermaid-container to enable horizontal overflow and prevent Mermaid SVGs from being squished.
  • Added hover styling and custom (WebKit) scrollbar styling for Mermaid containers.
  • Added light/dark theme-specific styling for Mermaid container surfaces.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +639 to +641
/* ════════════════════════════════════════════════════════════════
MERMAID DIAGRAMS — horizontal scroll + zoom on hover
════════════════════════════════════════════════════════════════ */
Comment on lines +644 to +658
.docusaurus-mermaid-container {
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
margin: 1.5rem 0;
border: 1px solid var(--ifm-color-emphasis-200);
border-radius: var(--gu-radius);
background: #fff;
padding: 0.5rem;
}

[data-theme='dark'] .docusaurus-mermaid-container {
background: #1a1a2e;
border-color: rgba(93, 173, 226, 0.15);
}
Comment on lines +660 to +667
/* Allow the SVG to keep its natural width (don't shrink to container) */
.docusaurus-mermaid-container svg {
width: auto !important;
max-width: none !important;
height: auto !important;
min-width: 600px; /* Ensures diagrams don't get squashed too small */
display: block;
}
Comment on lines +669 to +672
/* Zoom-on-hover: scale up slightly for readability */
.docusaurus-mermaid-container:hover {
box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
@JusterZhu JusterZhu merged commit ce5457a into main Jun 21, 2026
3 checks passed
@JusterZhu JusterZhu deleted the docs/core-execution-flow branch June 21, 2026 05:31
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