diff options
author | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-12-05 20:02:25 +0800 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-12-05 20:02:25 +0800 |
commit | 02d9d03d873b666b37b865c2323078ce7c433558 (patch) | |
tree | 22867fa38a9dd0b1c923c5def74b39f190b1b3fd /src/css/_partial/_post | |
parent | fa7e44cec87ae2ec0c572cf808976492d486e969 (diff) |
feat: auto expand and collapse toc
Diffstat (limited to 'src/css/_partial/_post')
-rw-r--r-- | src/css/_partial/_post/_toc.scss | 11 |
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; } } |