aboutsummaryrefslogtreecommitdiff
path: root/assets/book.scss
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-05-27 16:48:23 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-05-27 16:48:23 +0200
commite452a7bedabdfe0c0d62aa4e948902d6632a889d (patch)
treeea638449f93fb820ce3c3df0c6a3ee780edf7d61 /assets/book.scss
parent6d64cc708e73c38f23bfc5929608d5d77a9c5a07 (diff)
#52, Allow to set max showed levels of ToC. e.g. BookToC=3
Diffstat (limited to 'assets/book.scss')
-rw-r--r--assets/book.scss10
1 files changed, 10 insertions, 0 deletions
diff --git a/assets/book.scss b/assets/book.scss
index facc13a..66b1e81 100644
--- a/assets/book.scss
+++ b/assets/book.scss
@@ -147,6 +147,16 @@ ul.pagination {
nav > ul > li:first-child {
margin-top: 0;
}
+
+ // Classes to hide nested levels of ToC (can be replaced by @for, but it's more clear like this)
+ &.level-1 ul ul,
+ &.level-2 ul ul ul,
+ &.level-3 ul ul ul ul,
+ &.level-4 ul ul ul ul ul,
+ &.level-5 ul ul ul ul ul ul,
+ &.level-6 ul ul ul ul ul ul ul {
+ display: none;
+ }
}
.book-footer {