sidebar-toc.styl 949 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. .post-toc {
  2. font-size: $font-size-small;
  3. ol {
  4. list-style: none;
  5. margin: 0;
  6. padding: 0 2px 5px 10px;
  7. text-align: left;
  8. > ol {
  9. padding-left: 0;
  10. }
  11. a {
  12. transition-property: all;
  13. the-transition();
  14. }
  15. }
  16. .nav-item {
  17. line-height: 1.8;
  18. overflow: hidden;
  19. text-overflow: ellipsis;
  20. // text-align: justify;
  21. if (!hexo-config('toc.wrap')) {
  22. white-space: nowrap;
  23. }
  24. }
  25. .nav {
  26. .nav-child {
  27. display: hexo-config('toc.expand_all') ? block : none;
  28. }
  29. .active > .nav-child {
  30. display: block;
  31. }
  32. .active-current > .nav-child {
  33. display: block;
  34. > .nav-item {
  35. display: block;
  36. }
  37. }
  38. .active > a {
  39. border-bottom-color: $sidebar-highlight;
  40. color: $sidebar-highlight;
  41. }
  42. .active-current > a {
  43. color: $sidebar-highlight;
  44. &:hover {
  45. color: $sidebar-highlight;
  46. }
  47. }
  48. }
  49. }