Remove colors from <pre> and <code> to prevent proper working of "dark mode"

This commit is contained in:
djmaze 2021-02-24 00:51:05 +01:00
parent 2982027dd2
commit a1f4daff3a
2 changed files with 3 additions and 17 deletions

View file

@ -418,26 +418,21 @@
pre, code { pre, code {
margin: 0; margin: 0;
padding: 0;
background: #fff;
border: none; border: none;
border-radius: 0;
font-family: var(--fontMono);
display: block;
word-break: normal; word-break: normal;
word-wrap: break-word; word-wrap: break-word;
background-color: #f9f9f9;
} }
code { code {
border-radius: 0;
display: inline; display: inline;
padding: 2px 5px; padding: 2px 5px;
} }
pre { pre {
padding: 5px 10px;
border-radius: 5px; border-radius: 5px;
background-color: #f9f9f9; display: block;
padding: 5px 10px;
} }
pre > code { pre > code {
@ -454,9 +449,7 @@
pre { pre {
margin: 0; margin: 0;
padding: 0; padding: 0;
background: #fff;
border: none; border: none;
font-family: var(--fontMono);
display: block; display: block;
word-break: normal; word-break: normal;
} }
@ -465,7 +458,6 @@
display: inline-block; display: inline-block;
padding: 6px 10px; padding: 6px 10px;
border: 1px dashed #666; border: 1px dashed #666;
background: #fff;
word-break: break-all; word-break: break-all;
&.success { &.success {

View file

@ -14,15 +14,12 @@ pre {
font-weight: normal; font-weight: normal;
line-height: @baseLineHeight; line-height: @baseLineHeight;
font-size: @baseFontSize - 2; font-size: @baseFontSize - 2;
color: @grayDark;
border-radius: 3px; border-radius: 3px;
} }
// Inline code // Inline code
code { code {
padding: 2px 4px; padding: 2px 4px;
color: #d14;
background-color: #f7f7f9;
border: 1px solid #e1e1e8; border: 1px solid #e1e1e8;
} }
@ -34,15 +31,12 @@ pre {
font-size: @baseFontSize - 1; // 14px to 13px font-size: @baseFontSize - 1; // 14px to 13px
line-height: @baseLineHeight; line-height: @baseLineHeight;
white-space: pre-wrap; white-space: pre-wrap;
background-color: #f5f5f5;
border: 1px solid rgba(0,0,0,.15); border: 1px solid rgba(0,0,0,.15);
border-radius: 4px; border-radius: 4px;
// Account for some code outputs that place code tags in pre tags // Account for some code outputs that place code tags in pre tags
code { code {
padding: 0; padding: 0;
color: inherit;
background-color: transparent;
border: 0; border: 0;
} }
} }