From 7430855408390d1e561365715e21024b1a5acc7e Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 3 Feb 2020 20:23:26 -0300 Subject: CSS: Do CSS line numbering the right way --- site/css/styles.css | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'site') diff --git a/site/css/styles.css b/site/css/styles.css index 0b195e6..eb4bb78 100644 --- a/site/css/styles.css +++ b/site/css/styles.css @@ -41,15 +41,33 @@ footer li a { margin-left: 5px; } +div.sourceCode { + padding: 3px; + border: 1px solid; + border-radius: 10px; +} + pre { white-space: pre-wrap; - margin-left: 3ex; + counter-reset: line; } code { font-family: monospace; } +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; +} + article .header { color: #555; font-size: 14px; -- cgit v1.2.3