Skip to content

Commit

Permalink
Fix mermaid flowchart margin issue (go-gitea#27503)
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Oct 8, 2023
1 parent 8e1ef57 commit ff7141b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web_src/js/markup/mermaid.js
Expand Up @@ -4,9 +4,11 @@ import {displayError} from './common.js';

const {mermaidMaxSourceCharacters} = window.config;

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

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

0 comments on commit ff7141b

Please sign in to comment.