Fix scrolling in code blocks

This commit is contained in:
Shadowfacts 2019-09-16 17:52:38 -04:00
parent 6b276fdbe0
commit 3c5995cf02
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 9 additions and 16 deletions

View File

@ -114,17 +114,11 @@ article {
font-family: $monospace; font-family: $monospace;
color: var(--secondary-ui-text-color); color: var(--secondary-ui-text-color);
} }
pre { pre code::before,
&::before, &::after { pre code::after {
content: "```"; // we don't show the decorations for pre blocks, because it can interfere with scrolling horizontally
display: block; content: "";
background: none; display: none;
color: var(--secondary-ui-text-color);
}
code::before, code::after {
content: "";
display: none;
}
} }
strong::before, strong::after { strong::before, strong::after {
content: "**"; content: "**";
@ -285,7 +279,7 @@ a {
} }
pre { pre {
overflow: scroll; overflow-x: scroll;
-moz-tab-size: 4; -moz-tab-size: 4;
-o-tab-size: 4; -o-tab-size: 4;

View File

@ -8,11 +8,10 @@ Modified to use colors from CSS vars, defined in theme.scss
overflow-x: auto; overflow-x: auto;
padding: 0.5em; padding: 0.5em;
color: var(--atom-mono-1); color: var(--atom-mono-1);
background: var(--atom-base);
} }
.hljs > code { .hljs > code {
background: var(--atom-base);
display: block; display: block;
} }