_menu.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. .menu {
  2. position: -webkit-sticky;
  3. position: sticky;
  4. top: $grid-nav-height;
  5. padding: 0.5rem;
  6. margin: 0.5rem;
  7. margin-top: 0;
  8. padding-top: 0.85rem;
  9. height: calc(100vh - $grid-nav-height);
  10. overflow-y: auto;
  11. z-index: z('menu');
  12. @media only screen and (max-width: 600px) {
  13. top: 0;
  14. }
  15. &__label {
  16. font-family: $title-font;
  17. font-size: 1rem;
  18. margin: 0.65rem 0;
  19. padding-bottom: 0.5rem;
  20. text-transform: capitalize;
  21. @include themify($themes) {
  22. color: themed('toc-label-color');
  23. }
  24. @media only screen and (max-width: 600px) {
  25. text-align: center;
  26. font-size: 1.125rem;
  27. }
  28. }
  29. &__title {
  30. cursor: pointer;
  31. position: relative;
  32. word-break: break-word;
  33. font-size: 0.925rem;
  34. height: $menu-title-height;
  35. margin: 0.25rem 0;
  36. @include no-select;
  37. @include flexbox();
  38. @include align-items(center);
  39. @include themify($themes) {
  40. color: themed('body-color');
  41. @include on-event {
  42. color: themed('no-active-font-color');
  43. }
  44. &.active {
  45. font-weight: bold;
  46. color: themed('active-font-color');
  47. }
  48. }
  49. &--collapse {
  50. cursor: pointer;
  51. word-break: break-word;
  52. font-size: 16px;
  53. height: $menu-title-height;
  54. margin: 0.25rem 0;
  55. @include no-select;
  56. @include flexbox();
  57. @include align-items(center);
  58. @include themify($themes) {
  59. color: themed('body-color');
  60. &.active {
  61. font-weight: bold;
  62. color: themed('active-font-color');
  63. svg {
  64. color: themed('active-font-color');
  65. }
  66. }
  67. }
  68. @include on-event {
  69. @include themify($themes) {
  70. color: themed('link-hover');
  71. svg {
  72. color: themed('link-hover');
  73. @include translateX(0.125rem);
  74. }
  75. }
  76. }
  77. }
  78. &--icon {
  79. margin-top: 2px;
  80. @include themify($themes) {
  81. color: themed('menu-arrow-color');
  82. }
  83. &.down {
  84. @include rotate(90);
  85. @include transition(all, 0.15s, ease);
  86. }
  87. &.downrtl {
  88. @include rotate(-90);
  89. @include transition(all, 0.15s, ease);
  90. }
  91. &.right {
  92. @include rotate(0);
  93. @include transition(all, 0.15s, ease);
  94. }
  95. svg {
  96. display: block;
  97. margin: auto 0;
  98. @include transition(all, 0.15s, ease);
  99. }
  100. }
  101. }
  102. &__alone {
  103. cursor: pointer;
  104. @include no-select;
  105. }
  106. &__list {
  107. max-height: 0;
  108. overflow: hidden;
  109. word-wrap: break-word;
  110. @include transition();
  111. .active {
  112. font-weight: bold;
  113. }
  114. li {
  115. margin-left: 1.25rem;
  116. &.active {
  117. font-weight: bold;
  118. }
  119. }
  120. }
  121. .active {
  122. max-height: 100%;
  123. }
  124. li.active {
  125. @include themify($themes) {
  126. a {
  127. font-weight: bold;
  128. }
  129. }
  130. }
  131. }