Skip to content

Commit 6aa4648

Browse files
author
saowang
committed
Mermaid d-lang improved
1 parent 84337ca commit 6aa4648

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

_includes/shortcodes/mermaid.liquid

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<div class="mermaid overflow-x-auto p-3 mb-4" data-lang="{{ codes | split: ' ' | first }}">{{ codes }}</div>
1+
<div class="mermaid-wrap mb-4" data-lang="{{ codes | split: ' ' | first }}">
2+
<div class="mermaid overflow-x-auto p-3">{{ codes }}</div>
3+
</div>

_sass/class/markdown-body.scss

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
&:after {
66
position: absolute;
7-
right: 0;
8-
top: 0;
7+
right: 0px;
8+
top: 0px;
99
font-family: $mono-font;
1010
font-size: $font-size-small;
1111
content: attr(data-lang);
@@ -97,14 +97,17 @@
9797
margin-right: 3px;
9898
}
9999

100-
// improved mermaid
101-
// .mermaid:not([data-processed="true"])
102-
.mermaid {
103-
font-size: $font-size-small;
104-
font-family: $mono-font;
105-
white-space: pre;
100+
// mermaid improved
101+
.mermaid-wrap {
106102
@extend .d-lang;
107103
// mdl
108104
@include shadow-2dp();
105+
106+
// .mermaid:not([data-processed="true"])
107+
.mermaid {
108+
font-size: $font-size-small;
109+
font-family: $mono-font;
110+
white-space: pre;
111+
}
109112
}
110113
}

0 commit comments

Comments
 (0)