Scroll long code blocks

This sets the width of code blocks to be the width of the page, and
adds a scrollbar for long blocks. Article `c146e768bb41` has some
examples.

I could have also wrapped the codeblocks, but as pointed out by
[~kaki87] this often reduces readability. Hence: scrollbars.

[~kaki87]: https://todo.sr.ht/~edwardloveall/Scribe/6#event-188395
This commit is contained in:
Edward Loveall 2022-07-17 13:09:34 -04:00
parent 5b20d3f6d1
commit 269ccc1bef
No known key found for this signature in database
GPG key ID: A7606DFEC2BA731F
2 changed files with 8 additions and 0 deletions

View file

@ -3,6 +3,7 @@
* Fix source code link * Fix source code link
* Upgrade to Lucky 0.30.1 * Upgrade to Lucky 0.30.1
* Upgrade to Crystal 1.5.0 * Upgrade to Crystal 1.5.0
* Add scrollbar to long code blocks
2022-05-21 2022-05-21

View file

@ -34,3 +34,10 @@ figure iframe {
footer p span { footer p span {
margin-right: 1em; margin-right: 1em;
} }
pre {
background-color: rgba(127, 127, 127, 0.1);
padding: 1em;
overflow-x: scroll;
width: 100%;
}