From 68d9a070b0ec4a2de42021c72752b83608752032 Mon Sep 17 00:00:00 2001 From: Azriel Hoh Date: Fri, 12 Oct 2018 19:57:20 +1300 Subject: [PATCH] Improved codeblock rendering. --- static/css/codeblock.css | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/static/css/codeblock.css b/static/css/codeblock.css index 36fcdb7..b4468c1 100644 --- a/static/css/codeblock.css +++ b/static/css/codeblock.css @@ -1,9 +1,33 @@ /* --- Code blocks --- */ -.chroma .ln { - margin-right: 0.8em; - padding: 0 0.4em 0 0.4em; +.chroma .ln { + margin-right: 0.8em; + padding: 0 0.4em 0 0.4em; } pre code.hljs { padding: 9.5px; } + +.highlight tr, .highlight pre { + border: none; +} + +.highlight div:first-child { + border-radius: 4px; +} + +.highlight td:first-child pre { + border-top-left-radius: 4px; + border-top-right-radius: unset; + border-bottom-left-radius: 4px; + border-bottom-right-radius: unset; + overflow: hidden; +} + +.highlight td:last-child pre { + border-radius: unset; +} + +.highlight td:last-child pre code { + white-space: pre; +}