summaryrefslogtreecommitdiff
path: root/assets/plugins/_numbered.scss
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-10-08 17:03:40 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-10-08 17:03:49 +0200
commit007bc10c07d6a6b7cb6c03a138cc90f6f74a3058 (patch)
tree2e24514fcf5abf924d152bbac80c950db05be7d2 /assets/plugins/_numbered.scss
parent1cd5040d84e852504598ebc58f6839ce4453ca68 (diff)
Introduce SCSS plugins: dark mode and numbered headings
Diffstat (limited to 'assets/plugins/_numbered.scss')
-rw-r--r--assets/plugins/_numbered.scss23
1 files changed, 23 insertions, 0 deletions
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;
+ }
+}