Skip to content

Commit 7eb499e

Browse files
committed
Tune Mermaid default display size
1 parent c491d17 commit 7eb499e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

docs/.vitepress/theme/style.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,11 @@
546546

547547
.vp-doc .mermaid svg {
548548
display: block;
549-
width: 100% !important;
549+
width: auto !important;
550550
max-width: 100% !important;
551551
min-width: 0;
552552
height: auto !important;
553+
max-height: min(68vh, 760px) !important;
553554
margin: 0 auto;
554555
}
555556

@@ -600,9 +601,10 @@ html:lang(zh-CN) .vp-doc .mermaid::after {
600601
}
601602

602603
.vp-doc .mermaid svg {
603-
width: 100% !important;
604+
width: auto !important;
604605
max-width: 100% !important;
605606
min-width: 0;
607+
max-height: min(56vh, 520px) !important;
606608
}
607609

608610
.vp-doc .mermaid .label,

0 commit comments

Comments
 (0)