Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix opaque background on mermaid diagrams #21642

Merged
merged 3 commits into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions web_src/js/markup/mermaid.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {isDarkTheme} from '../utils.js';
const {mermaidMaxSourceCharacters} = window.config;

const iframeCss = `
:root {color-scheme: normal}
body {margin: 0; padding: 0}
#mermaid {display: block; margin: 0 auto}
`;
Expand Down
1 change: 1 addition & 0 deletions web_src/less/markup/content.less
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@
width: 100%;
height: var(--height-loading); // actual height is set in JS after loading
overflow: hidden;
color-scheme: normal; // match the value inside the iframe to allow it to become transparent
}

.markup-block-error {
Expand Down