aboutsummaryrefslogtreecommitdiff
path: root/src/css/_partial/_post/_toc.scss
diff options
context:
space:
mode:
authorolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-12-05 20:02:25 +0800
committerolOwOlo <26087907+olOwOlo@users.noreply.github.com>2017-12-05 20:02:25 +0800
commit02d9d03d873b666b37b865c2323078ce7c433558 (patch)
tree22867fa38a9dd0b1c923c5def74b39f190b1b3fd /src/css/_partial/_post/_toc.scss
parentfa7e44cec87ae2ec0c572cf808976492d486e969 (diff)
feat: auto expand and collapse toc
Diffstat (limited to 'src/css/_partial/_post/_toc.scss')
-rw-r--r--src/css/_partial/_post/_toc.scss11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/css/_partial/_post/_toc.scss b/src/css/_partial/_post/_toc.scss
index b5958c0..8327055 100644
--- a/src/css/_partial/_post/_toc.scss
+++ b/src/css/_partial/_post/_toc.scss
@@ -20,6 +20,10 @@
.post-toc-content {
font-size: $post-toc-content;
+ &.always-active ul {
+ display: block;
+ }
+
>nav>ul {
margin: 10px 0;
}
@@ -27,9 +31,14 @@
ul {
padding-left: 20px;
list-style: $post-toc-list-style;
-
+
ul {
padding-left: 15px;
+ display: none;
+ }
+
+ .has-active > ul {
+ display: block;
}
}