From 72a3f47392f54ff937f85dca8f5c3b4c742ce674 Mon Sep 17 00:00:00 2001 From: paspo Date: Tue, 30 Jul 2024 23:40:10 +0200 Subject: [PATCH] numeri di linea --- assets/sass/custom.scss | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/assets/sass/custom.scss b/assets/sass/custom.scss index 5398b8e..2cb15c0 100644 --- a/assets/sass/custom.scss +++ b/assets/sass/custom.scss @@ -101,3 +101,22 @@ figcaption { /* Avoid pushing up the copy buttons. */ margin: 0; } + +/* numerazione linee */ +div.highlight pre { + counter-reset: line; + white-space: pre-wrap; +} + +div.highlight pre code > span { + counter-increment: line; + padding-left: 1.5em; +} + +div.highlight pre code > span::before { + font-size: 0.8em; + color: #999; + content: counter(line) ". "; + display: inline-block; + padding-right: 0.2em; +}