From 8dc5f1ad747c71c9569a005289af07b42f0f6557 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 5 Aug 2020 16:25:25 -0300 Subject: Simplify styles.css and setup line number for code blocks Doesn't work for code blocks with 1000 or more lines, though. It works well enough for now. --- styles.css | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) (limited to 'styles.css') diff --git a/styles.css b/styles.css index 4753faa..5ae6fa3 100644 --- a/styles.css +++ b/styles.css @@ -51,29 +51,18 @@ footer li a { margin-left: 5px; } -pre { - padding: 5px; - border: 1px solid; +pre.lineno { + margin-right: 3px; + padding-right: 3px; + border-right: 1px solid; border-color: hsla(0, 0%, 0%, 0.3); - border-radius: 5px; - white-space: pre-wrap; - counter-reset: line; -} - -code { - font-family: monospace; + text-align: right; + user-select: none; } -pre a:before { - color: #aaa; - content: counter(line); - counter-increment: line; - display: inline-block; - width: 3em; - margin-left: auto; - margin-right: 1em; - padding-left: auto; - text-align: right; +pre.highlight { + border-top: 1px solid; + border-bottom: 1px solid; } article .header { -- cgit v1.2.3