if (hexo-config('toc.enable')) { .post-toc { font-size: $font-size-small; ol { list-style: none; margin: 0; padding: 0 2px 0 10px; text-align: left; > :last-child { margin-bottom: 5px; } > ol { padding-left: 0; } a { transition: all $transition-ease; } } .nav-item { line-height: 1.8; overflow: hidden; text-overflow: ellipsis; if (not hexo-config('toc.wrap')) { white-space: nowrap; } } .nav { if (not hexo-config('toc.expand_all')) { .nav-child { height: 0; opacity: 0; overflow: hidden; transition-property: height, opacity; transition: $transition-ease; } .active > .nav-child { height: auto; // https://caniuse.com/mdn-css_types_calc-size height: calc-size(auto, size); opacity: 1; } } .active > a { border-bottom-color: $sidebar-highlight; color: $sidebar-highlight; } .active-current > a { color: $sidebar-highlight; &:hover { color: $sidebar-highlight; } } } } }