_sidenav.scss 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. .sidenav {
  2. position: fixed;
  3. width: $sidenav-width;
  4. left: 0;
  5. top: 0;
  6. margin: 0;
  7. transform: translateX(-100%);
  8. height: 100%;
  9. height: calc(100% + 60px);
  10. height: -moz-calc(100%); //Temporary Firefox Fix
  11. padding-bottom: 60px;
  12. background-color: $sidenav-bg-color;
  13. z-index: 999;
  14. overflow-y: auto;
  15. will-change: transform;
  16. backface-visibility: hidden;
  17. transform: translateX(-105%);
  18. @extend .z-depth-1;
  19. // Right Align
  20. &.right-aligned {
  21. right: 0;
  22. transform: translateX(105%);
  23. left: auto;
  24. transform: translateX(100%);
  25. }
  26. .collapsible {
  27. margin: 0;
  28. }
  29. li {
  30. float: none;
  31. line-height: $sidenav-line-height;
  32. &.active { background-color: rgba(0,0,0,.05); }
  33. }
  34. li > a {
  35. color: $sidenav-font-color;
  36. display: block;
  37. font-size: $sidenav-font-size;
  38. font-weight: 500;
  39. height: $sidenav-item-height;
  40. line-height: $sidenav-line-height;
  41. padding: 0 ($sidenav-padding * 2);
  42. &:hover { background-color: rgba(0,0,0,.05);}
  43. &.btn, &.btn-large, &.btn-flat, &.btn-floating {
  44. margin: 10px 15px;
  45. }
  46. &.btn,
  47. &.btn-large,
  48. &.btn-floating { color: $button-raised-color; }
  49. &.btn-flat { color: $button-flat-color; }
  50. &.btn:hover,
  51. &.btn-large:hover { background-color: lighten($button-raised-background, 5%); }
  52. &.btn-floating:hover { background-color: $button-raised-background; }
  53. & > i,
  54. & > [class^="mdi-"], li > a > [class*="mdi-"],
  55. & > i.material-icons {
  56. float: left;
  57. height: $sidenav-item-height;
  58. line-height: $sidenav-line-height;
  59. margin: 0 ($sidenav-padding * 2) 0 0;
  60. width: $sidenav-item-height / 2;
  61. color: rgba(0,0,0,.54);
  62. }
  63. }
  64. .divider {
  65. margin: ($sidenav-padding / 2) 0 0 0;
  66. }
  67. .subheader {
  68. &:hover {
  69. background-color: transparent;
  70. }
  71. cursor: initial;
  72. pointer-events: none;
  73. color: rgba(0,0,0,.54);
  74. font-size: $sidenav-font-size;
  75. font-weight: 500;
  76. line-height: $sidenav-line-height;
  77. }
  78. .user-view {
  79. position: relative;
  80. padding: ($sidenav-padding * 2) ($sidenav-padding * 2) 0;
  81. margin-bottom: $sidenav-padding / 2;
  82. & > a {
  83. &:hover { background-color: transparent; }
  84. height: auto;
  85. padding: 0;
  86. }
  87. .background {
  88. overflow: hidden;
  89. position: absolute;
  90. top: 0;
  91. right: 0;
  92. bottom: 0;
  93. left: 0;
  94. z-index: -1;
  95. }
  96. .circle, .name, .email {
  97. display: block;
  98. }
  99. .circle {
  100. height: 64px;
  101. width: 64px;
  102. }
  103. .name,
  104. .email {
  105. font-size: $sidenav-font-size;
  106. line-height: $sidenav-line-height / 2;
  107. }
  108. .name {
  109. margin-top: 16px;
  110. font-weight: 500;
  111. }
  112. .email {
  113. padding-bottom: 16px;
  114. font-weight: 400;
  115. }
  116. }
  117. }
  118. // Touch interaction
  119. .drag-target {
  120. // Right Align
  121. &.right-aligned {
  122. right: 0;
  123. }
  124. height: 100%;
  125. width: 10px;
  126. position: fixed;
  127. top: 0;
  128. z-index: 998;
  129. }
  130. // Fixed Sidenav shown
  131. .sidenav.sidenav-fixed {
  132. // Right Align
  133. &.right-aligned {
  134. right: 0;
  135. left: auto;
  136. }
  137. left: 0;
  138. transform: translateX(0);
  139. position: fixed;
  140. }
  141. // Fixed Sidenav hide on smaller
  142. @media #{$medium-and-down} {
  143. .sidenav {
  144. &.sidenav-fixed {
  145. transform: translateX(-105%);
  146. &.right-aligned {
  147. transform: translateX(105%);
  148. }
  149. }
  150. > a {
  151. padding: 0 $sidenav-padding;
  152. }
  153. .user-view {
  154. padding: $sidenav-padding $sidenav-padding 0;
  155. }
  156. }
  157. }
  158. .sidenav .collapsible-body > ul:not(.collapsible) > li.active,
  159. .sidenav.sidenav-fixed .collapsible-body > ul:not(.collapsible) > li.active {
  160. background-color: $primary-color;
  161. a {
  162. color: $sidenav-bg-color;
  163. }
  164. }
  165. .sidenav .collapsible-body {
  166. padding: 0;
  167. }
  168. .sidenav-overlay {
  169. position: fixed;
  170. top: 0;
  171. left: 0;
  172. right: 0;
  173. opacity: 0;
  174. height: 120vh;
  175. background-color: rgba(0,0,0,.5);
  176. z-index: 997;
  177. display: none;
  178. }