_sidebar_left.scss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. .sidebar-left {
  2. //position: relative;
  3. //overflow: hidden;
  4. z-index: $sidebar-left-z-index;
  5. // SIDEBAR HEADER
  6. // -----------------------------------------------------------------------------
  7. .sidebar-header {
  8. position: relative;
  9. color: $color-default-inverse;
  10. height: $sidebar-top-header-size;
  11. .sidebar-title {
  12. color: #465162;
  13. padding: 15px;
  14. @include font-size(15);
  15. }
  16. .sidebar-toggle {
  17. position: absolute;
  18. top: 0;
  19. right: 0;
  20. width: $sidebar-toggle-width;
  21. height: $sidebar-top-header-size;
  22. background-color: $sidebar-toggle-background;
  23. border-radius: 0 0 0 $sidebar-toggle-bottom-radius;
  24. text-align: center;
  25. cursor: pointer;
  26. i {
  27. color: $sidebar-toggle-color;
  28. @include font-size(17);
  29. line-height: $sidebar-top-header-size;
  30. @include transition(all 0.15s ease-in-out);
  31. }
  32. &:hover {
  33. i {
  34. color: $sidebar-toggle-hover-color;
  35. }
  36. }
  37. }
  38. }
  39. hr.separator {
  40. background: none;
  41. margin: 20px 10px 20px;
  42. }
  43. }
  44. // REMOVE NANO STYLE FOR BOXED AND SCROLL
  45. // -----------------------------------------------------------------------------
  46. /* Unstyle nano for non fixed layouts */
  47. @media only screen and (min-width: 768px) {
  48. html.scroll,
  49. html.boxed {
  50. .sidebar-left {
  51. .nano {
  52. position: static;
  53. height: auto;
  54. overflow: visible;
  55. width: auto;
  56. .nano-content {
  57. margin-right: 0 !important;
  58. position: static;
  59. overflow: visible;
  60. }
  61. .nano-pane {
  62. display: none !important;
  63. }
  64. }
  65. }
  66. }
  67. html.boxed,
  68. html.scroll {
  69. .sidebar-left {
  70. .nano {
  71. > .nano-content {
  72. overflow: visible !important;
  73. }
  74. }
  75. }
  76. }
  77. }
  78. // SIDEBAR LEFT COLLAPSED
  79. // -----------------------------------------------------------------------------
  80. @media only screen and (min-width: 768px) {
  81. html.sidebar-left-collapsed {
  82. .sidebar-left {
  83. .sidebar-title {
  84. margin-left: -$sidebar-left-full-width;
  85. opacity: 0;
  86. }
  87. .sidebar-toggle {
  88. border-radius: 0;
  89. }
  90. .nav-main {
  91. > li > a {
  92. overflow: hidden;
  93. text-overflow: clip;
  94. }
  95. li {
  96. // has children
  97. &.nav-parent {
  98. // arrow
  99. a:after {
  100. display: none;
  101. }
  102. ul.nav-children {
  103. display: none;
  104. }
  105. }
  106. }
  107. // text
  108. a span {
  109. visibility: hidden;
  110. }
  111. }
  112. .sidebar-widget,
  113. .separator {
  114. display: none;
  115. }
  116. }
  117. // boxed and scroll
  118. &.scroll,
  119. &.boxed {
  120. .sidebar-left {
  121. overflow: visible;
  122. .nav-main {
  123. li {
  124. &.nav-active {
  125. a:hover {
  126. color: $color-primary;
  127. }
  128. }
  129. &.nav-expanded {
  130. background: transparent;
  131. ul.nav-children {
  132. display: none;
  133. }
  134. }
  135. // children
  136. ul.nav-children {
  137. position: absolute;
  138. left: $sidebar-left-collapsed-width - ($menu-item-active-border-width + 4);
  139. width: $sidebar-left-full-width - $sidebar-left-collapsed-width + ($menu-item-active-border-width + 4);
  140. background: $menu-item-active-background;
  141. }
  142. }
  143. // NAV HOVER
  144. // -----------------------------------------------------------------------------
  145. & > li:hover {
  146. width: $sidebar-left-full-width;
  147. background: $menu-item-active-background;
  148. & > a {
  149. background: transparent;
  150. i {
  151. margin-right: 22px;
  152. }
  153. span {
  154. display: inline;
  155. visibility: visible;
  156. }
  157. span.label {
  158. background-color: $color-primary;
  159. color: $color-primary-inverse;
  160. }
  161. }
  162. & > ul.nav-children {
  163. display: block;
  164. li a {
  165. padding-left: 15px;
  166. }
  167. }
  168. }
  169. }
  170. }
  171. }
  172. // fixed
  173. &.fixed {
  174. .sidebar-left {
  175. .nano {
  176. background: $sidebar-background;
  177. box-shadow: -$sidebar-border-width 0 0 $sidebar-border-color inset;
  178. }
  179. }
  180. .sidebar-left .nano:hover {
  181. width: $sidebar-left-full-width;
  182. .nav-main {
  183. .nav-expanded {
  184. ul.nav-children {
  185. display: block;
  186. }
  187. }
  188. li {
  189. // has children
  190. &.nav-parent {
  191. // arrow
  192. a:after {
  193. display: inline-block;
  194. }
  195. }
  196. // text
  197. a span {
  198. visibility: visible;
  199. }
  200. }
  201. }
  202. .sidebar-widget,
  203. .separator {
  204. display: block;
  205. }
  206. }
  207. }
  208. }
  209. }