Skip to content

Commit b085694

Browse files
committed
Fix mermaid flowchart margin issue (go-gitea#27503)
Fixes: go-gitea#27435 Related: mermaid-js/mermaid#4907 <img width="924" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/494a1d2e-4c56-48d0-9843-82a5e5aa977e">
1 parent 4ffa683 commit b085694

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web_src/js/markup/mermaid.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import {displayError} from './common.js';
44

55
const {mermaidMaxSourceCharacters} = window.config;
66

7+
// margin removal is for https://github.com/mermaid-js/mermaid/issues/4907
78
const iframeCss = `:root {color-scheme: normal}
89
body {margin: 0; padding: 0; overflow: hidden}
9-
#mermaid {display: block; margin: 0 auto}`;
10+
#mermaid {display: block; margin: 0 auto}
11+
blockquote, dd, dl, figure, h1, h2, h3, h4, h5, h6, hr, p, pre {margin: 0}`;
1012

1113
export async function renderMermaid() {
1214
const els = document.querySelectorAll('.markup code.language-mermaid');

0 commit comments

Comments
 (0)