Feat: enhance Mermaid configuration and fix initialization bug (#617)

* 🐛 Fix: Mermaid initialization conflict error

*  Feat: enhance Mermaid configuration with security level, look, and font family options
This commit is contained in:
Cell
2025-08-14 15:29:23 +08:00
committed by GitHub
parent ba6cc4ed8e
commit e04bb611dc
12 changed files with 70 additions and 29 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ code {
}
// indented code
pre:not(.mermaid[data-processed='true']) {
pre:not(.mermaid[data-processed]) {
margin: 0;
line-height: 1.45em;
padding: 0.5rem;
@@ -1,3 +1,8 @@
// Diagram container
.diagram-container {
position: relative;
}
// Diagram copy button styles
.diagram-copy-btn {
position: absolute;
@@ -50,8 +55,15 @@
}
}
// Diagram containers
.mermaid-container,
.echarts-container {
position: relative;
@media only screen and (min-width: 1201px) {
.diagram-container {
.diagram-copy-btn {
display: none;
}
&:hover {
.diagram-copy-btn {
display: block;
}
}
}
}
+2 -1
View File
@@ -1,7 +1,8 @@
.mermaid {
position: relative;
overflow: hidden !important;
&[data-processed='true'] {
&[data-processed] {
text-align: center;
}