fix(theme): optimize mermaid

This commit is contained in:
pengzhanbo 2025-03-16 13:01:55 +08:00
parent 0fd6cac574
commit de7b25ed7c
2 changed files with 23 additions and 19 deletions

View File

@ -16,22 +16,3 @@
.vp-comment {
margin-top: 80px;
}
/* ------------------ Mermaid ------------------ */
.mermaid-preview {
background-color: rgba(0, 0, 0, 0.45);
}
.mermaid-preview > svg {
background-color: var(--vp-c-bg);
}
@media (min-width: 960px) {
.mermaid-preview > svg {
padding: 16px 24px;
margin: 0 16px;
border-radius: 8px;
box-shadow: var(--vp-shadow-2);
}
}

View File

@ -322,6 +322,29 @@
display: inline-block;
}
.mermaid-wrapper p {
line-height: inherit;
}
.mermaid-preview {
background-color: rgba(0, 0, 0, 0.45);
}
.mermaid-preview > svg {
background-color: var(--vp-c-bg);
}
@media (min-width: 960px) {
.mermaid-preview > svg {
padding: 16px 24px;
margin: 0 16px;
border-radius: 8px;
box-shadow: var(--vp-shadow-2);
}
}
/* --------------------- Markdown Enhance: Flowchart ------------------------ */
.flowchart-wrapper svg {
display: inline-block;
}