From 007bc10c07d6a6b7cb6c03a138cc90f6f74a3058 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Tue, 8 Oct 2019 17:03:40 +0200 Subject: Introduce SCSS plugins: dark mode and numbered headings --- assets/plugins/_numbered.scss | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 assets/plugins/_numbered.scss (limited to 'assets/plugins/_numbered.scss') diff --git a/assets/plugins/_numbered.scss b/assets/plugins/_numbered.scss new file mode 100644 index 0000000..a1e89d8 --- /dev/null +++ b/assets/plugins/_numbered.scss @@ -0,0 +1,23 @@ +.book-page { + .markdown { + @for $h from 1 through 6 { + > h#{$h} { + counter-increment: h#{$h}; + counter-reset: h#{$h + 1}; + + $content: ""; + @for $n from 1 through $h { + $content: $content + 'counter(h#{$n})"."'; + } + + &::before { + content: unquote($content) " "; + } + } + } + } + + + .book-toc nav ul { + list-style: decimal; + } +} -- cgit v1.2.3