_menu.scss 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. @import "mixins";
  2. nav.book-menu {
  3. @include custom-scrollbar;
  4. text-transform: capitalize;
  5. ul {
  6. padding: 0;
  7. margin: 0;
  8. list-style: none;
  9. li {
  10. margin: 1em 0;
  11. }
  12. a {
  13. display: block;
  14. }
  15. a:hover {
  16. opacity: 0.5;
  17. }
  18. ul {
  19. padding-left: $padding-16;
  20. }
  21. }
  22. ul:not(.expanded) > .section {
  23. &:nth-of-type(7) {
  24. &::before {
  25. position: absolute;
  26. top: 0;
  27. left: -1rem;
  28. right: 0.5rem;
  29. content: ' ';
  30. border-top: 1px solid $gray-400;
  31. }
  32. padding-top: 1em;
  33. }
  34. &:nth-of-type(n + 7) {
  35. color: $gray-700;
  36. }
  37. }
  38. .section {
  39. position: relative;
  40. .section-link {
  41. display: flex;
  42. align-items: center;
  43. .section-icon {
  44. width: 12px;
  45. height: 12px;
  46. transform: rotateZ(90deg);
  47. opacity: 0.5;
  48. margin-left: -15px;
  49. margin-right: 3px;
  50. cursor: pointer;
  51. transition: opacity 0.2s;
  52. &:hover {
  53. opacity: 0.9;
  54. }
  55. &.expanded {
  56. transform: rotateZ(180deg);
  57. }
  58. }
  59. a {
  60. flex: 1;
  61. }
  62. }
  63. > ul {
  64. max-height: 0px;
  65. overflow: hidden;
  66. &.expanded {
  67. max-height: initial;
  68. > li:last-child {
  69. margin-bottom: 0;
  70. }
  71. }
  72. }
  73. }
  74. }