feat(docs): add horizontal scroll + zoom interaction for mermaid flowcharts#135
Merged
Conversation
…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>
There was a problem hiding this comment.
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-containerto 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); | ||
| } |
This was referenced Jun 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Before/After