MainMenu.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. // stylelint-disable declaration-no-important
  2. .sidebar-main-menu {
  3. overflow: auto;
  4. overflow-x: hidden;
  5. // So the last items in the menu will be seen when the menu is vertically scrollable
  6. margin-bottom: 52px;
  7. // Scrollbar styling for firefox
  8. scrollbar-color: theme('colors.grey.200');
  9. scrollbar-width: thin;
  10. @include transition(margin-bottom $menu-transition-duration ease);
  11. //Custom scrollbar styling for windows/mac and slim mode
  12. &::-webkit-scrollbar {
  13. width: 4px;
  14. }
  15. &::-webkit-scrollbar-button {
  16. @apply w-hidden;
  17. // Hide the scrollbar arrows on windows
  18. }
  19. &::-webkit-scrollbar-thumb {
  20. @apply w-bg-grey-200 w-rounded-sm;
  21. }
  22. &::-webkit-scrollbar-track {
  23. @apply w-bg-transparent;
  24. }
  25. &--open-footer {
  26. margin-bottom: 127px;
  27. }
  28. &__list {
  29. margin: 0;
  30. padding: 0;
  31. list-style-type: none;
  32. }
  33. *:focus {
  34. @include show-focus-outline-inside;
  35. }
  36. .icon--menuitem {
  37. width: 1.25em;
  38. height: 1.25em;
  39. min-width: 1.25em;
  40. margin-inline-end: 0.5em;
  41. vertical-align: text-top;
  42. }
  43. .icon--submenu-header {
  44. display: block;
  45. width: 4rem;
  46. height: 4rem;
  47. margin: 0 auto 0.8em;
  48. opacity: 0.15;
  49. }
  50. > ul > li > a {
  51. // Need !important to override body.ready class
  52. transition: padding $menu-transition-duration ease !important;
  53. .menuitem-label {
  54. transition: opacity $menu-transition-duration ease;
  55. }
  56. }
  57. }
  58. .sidebar-footer {
  59. @apply w-bg-primary w-bottom-0 w-fixed;
  60. transition: width $menu-transition-duration ease !important; // Override body.ready
  61. width: $menu-width;
  62. > ul,
  63. ul > li {
  64. margin: 0;
  65. padding: 0;
  66. list-style-type: none;
  67. }
  68. ul > li {
  69. position: relative;
  70. @include transition(border-color $menu-transition-duration ease);
  71. }
  72. > ul {
  73. @include transition(max-height $menu-transition-duration ease);
  74. visibility: hidden;
  75. max-height: 0;
  76. a {
  77. border-inline-start: 3px solid transparent;
  78. overflow: hidden;
  79. text-overflow: ellipsis;
  80. white-space: nowrap;
  81. &:before {
  82. font-size: 1rem;
  83. margin-inline-end: 0.5em;
  84. vertical-align: -10%;
  85. }
  86. }
  87. }
  88. &__account {
  89. @include show-focus-outline-inside();
  90. &-toggle {
  91. @apply w-pl-2 w-inline-flex w-justify-between w-w-full w-translate-x-0 w-transition w-duration-150;
  92. }
  93. &-label {
  94. @apply w-text-white w-text-left w-overflow-hidden w-whitespace-nowrap w-text-ellipsis;
  95. }
  96. }
  97. @at-root .sidebar--slim #{&} {
  98. width: $menu-width-slim;
  99. &__account {
  100. @apply w-px-0 w-pb-3 w-justify-center;
  101. }
  102. &__account-toggle {
  103. @apply w-hidden;
  104. }
  105. }
  106. &--open {
  107. width: $menu-width !important; // Override collapsed style
  108. > ul {
  109. max-height: $nav-footer-submenu-height;
  110. visibility: visible;
  111. }
  112. }
  113. }