Fix Mermaid diagram styles

pull/1/head
David Benqué 4 years ago
parent d571822adf
commit 92bdc6b33b

@ -207,8 +207,8 @@
// Rendered Markdown // Rendered Markdown
@cp_markdown-bg: @cryptpad_color_grey_900; @cp_markdown-bg: @cryptpad_color_grey_900;
@cp_markdown-border: @cryptpad_color_grey_700; @cp_markdown-border: @cryptpad_color_grey_700;
@cp_markdown-contrast-fg: white; // XXX @cp_markdown-block-fg: @cryptpad_text_col;
@cp_markdown-contrast-bg: @cryptpad_color_grey; // XXX @cp_markdown-block-bg: @cryptpad_color_grey_800;
// Avatar // Avatar
@cp_avatar-bg: @cryptpad_color_grey_700; @cp_avatar-bg: @cryptpad_color_grey_700;

@ -206,8 +206,8 @@
// Rendered Markdown // Rendered Markdown
@cp_markdown-bg: @cryptpad_color_lighter_grey; @cp_markdown-bg: @cryptpad_color_lighter_grey;
@cp_markdown-border: @cryptpad_color_grey; @cp_markdown-border: @cryptpad_color_grey;
@cp_markdown-contrast-fg: @cryptpad_text_col; // XXX @cp_markdown-block-fg: @cryptpad_text_col; // XXX
@cp_markdown-contrast-bg: transparent; // XXX @cp_markdown-block-bg: @cryptpad_color_grey_200; // XXX
// Avatar // Avatar
@cp_avatar-bg: @cryptpad_color_grey; @cp_avatar-bg: @cryptpad_color_grey;

@ -151,27 +151,34 @@
// XXX apply the styles below in modals-ui-elements.less // XXX apply the styles below in modals-ui-elements.less
pre.mermaid[mermaid-source^="pie"] { // XXX pre.mermaid[mermaid-source^="pie"] {
g.legend text, text.pieTitleText { g.legend text, text.pieTitleText {
fill: @cp_markdown-contrast-fg; fill: @cp_markdown-block-fg;
} }
} }
pre.mermaid[mermaid-source^="gantt"] { // XXX pre.mermaid[mermaid-source^="gantt"] {
background-color: @cp_markdown-contrast-bg;
background-color: #444;
text.titleText { text.titleText {
fill: @cp_markdown-contrast-fg; fill: @cp_markdown-block-fg;
}
g.tick {
text {
fill: @cp_markdown-block-fg;
}
line {
stroke: fade(@cp_markdown-block-fg, 50%);
}
} }
} }
/* make sure markmap text shows up in dark mode */ pre.markmap svg {
pre.markmap svg { // XXX color: @cp_markdown-block-fg;
color: @cp_markdown-contrast-fg;
} }
pre.mathjax { // XXX pre.mathjax {
background-color: @cp_markdown-contrast-bg; padding: 5px;
color: @cryptpad_text_col;
background-color: @cp_markdown-block-bg;
} }
} }
@ -179,13 +186,13 @@
pre > code { pre > code {
display: block; display: block;
position: relative; position: relative;
border: 1px solid @cp_markdown-border;
width: 90%; width: 90%;
margin: auto; margin: auto;
padding-left: .25vw; padding: 5px;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden; overflow-y: hidden;
background-color: @cp_markdown-contrast-bg; // XXX color: @cp_markdown-block-fg;
background-color: @cp_markdown-block-bg; // XXX
} }
} }

Loading…
Cancel
Save