control-sidebar.less 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. /*
  2. * Component: Control sidebar. By default, this is the right sidebar.
  3. */
  4. // The sidebar's background control class
  5. // This is a hack to make the background visible while scrolling
  6. .control-sidebar-bg {
  7. position: fixed;
  8. z-index: 1000;
  9. bottom: 0;
  10. }
  11. // Transitions
  12. .control-sidebar-bg,
  13. .control-sidebar {
  14. top: 0;
  15. right: -@control-sidebar-width;
  16. width: @control-sidebar-width;
  17. .transition(right @transition-speed ease-in-out);
  18. }
  19. // The sidebar
  20. .control-sidebar {
  21. position: absolute;
  22. padding-top: @navbar-height;
  23. z-index: 1010;
  24. // Fix position after header collapse
  25. @media (max-width: @screen-xs-max) {
  26. padding-top: @navbar-height + 50;
  27. }
  28. // Tab panes
  29. > .tab-content {
  30. padding: 10px 15px;
  31. }
  32. // Open state with slide over content effect
  33. &.control-sidebar-open {
  34. &,
  35. + .control-sidebar-bg {
  36. right: 0;
  37. }
  38. }
  39. }
  40. // Open without slide over content
  41. .control-sidebar-open {
  42. .control-sidebar-bg,
  43. .control-sidebar {
  44. right: 0;
  45. }
  46. @media (min-width: @screen-sm) {
  47. .content-wrapper,
  48. .right-side,
  49. .main-footer {
  50. margin-right: @control-sidebar-width;
  51. }
  52. }
  53. }
  54. // Fixed Layout
  55. .fixed {
  56. .control-sidebar {
  57. position: fixed;
  58. height: 100%;
  59. overflow-y: auto;
  60. padding-bottom: 50px;
  61. }
  62. }
  63. // Control sidebar tabs
  64. .nav-tabs.control-sidebar-tabs {
  65. > li {
  66. &:first-of-type > a {
  67. &,
  68. &:hover,
  69. &:focus {
  70. border-left-width: 0;
  71. }
  72. }
  73. > a {
  74. .border-radius(0);
  75. // Hover and active states
  76. &,
  77. &:hover {
  78. border-top: none;
  79. border-right: none;
  80. border-left: 1px solid transparent;
  81. border-bottom: 1px solid transparent;
  82. }
  83. .icon {
  84. font-size: 16px;
  85. }
  86. }
  87. // Active state
  88. &.active {
  89. > a {
  90. &,
  91. &:hover,
  92. &:focus,
  93. &:active {
  94. border-top: none;
  95. border-right: none;
  96. border-bottom: none;
  97. }
  98. }
  99. }
  100. }
  101. // Remove responsiveness on small screens
  102. @media (max-width: @screen-sm) {
  103. display: table;
  104. > li {
  105. display: table-cell;
  106. }
  107. }
  108. }
  109. // Headings in the sidebar content
  110. .control-sidebar-heading {
  111. font-weight: 400;
  112. font-size: 16px;
  113. padding: 10px 0;
  114. margin-bottom: 10px;
  115. }
  116. // Subheadings
  117. .control-sidebar-subheading {
  118. display: block;
  119. font-weight: 400;
  120. font-size: 14px;
  121. }
  122. // Control Sidebar Menu
  123. .control-sidebar-menu {
  124. list-style: none;
  125. padding: 0;
  126. margin: 0 -15px;
  127. > li > a {
  128. .clearfix();
  129. display: block;
  130. padding: 10px 15px;
  131. > .control-sidebar-subheading {
  132. margin-top: 0;
  133. }
  134. }
  135. .menu-icon {
  136. float: left;
  137. width: 35px;
  138. height: 35px;
  139. border-radius: 50%;
  140. text-align: center;
  141. line-height: 35px;
  142. }
  143. .menu-info {
  144. margin-left: 45px;
  145. margin-top: 3px;
  146. > .control-sidebar-subheading {
  147. margin: 0;
  148. }
  149. > p {
  150. margin: 0;
  151. font-size: 11px;
  152. }
  153. }
  154. .progress {
  155. margin: 0;
  156. }
  157. }
  158. // Dark skin
  159. .control-sidebar-dark {
  160. color: @sidebar-dark-color;
  161. // Background
  162. &,
  163. + .control-sidebar-bg {
  164. background: @sidebar-dark-bg;
  165. }
  166. // Sidebar tabs
  167. .nav-tabs.control-sidebar-tabs {
  168. border-bottom: darken(@sidebar-dark-bg, 3%);
  169. > li {
  170. > a {
  171. background: darken(@sidebar-dark-bg, 5%);
  172. color: @sidebar-dark-color;
  173. // Hover and active states
  174. &,
  175. &:hover,
  176. &:focus {
  177. border-left-color: darken(@sidebar-dark-bg, 7%);
  178. border-bottom-color: darken(@sidebar-dark-bg, 7%);
  179. }
  180. &:hover,
  181. &:focus,
  182. &:active {
  183. background: darken(@sidebar-dark-bg, 3%);
  184. }
  185. &:hover {
  186. color: #fff;
  187. }
  188. }
  189. // Active state
  190. &.active {
  191. > a {
  192. &,
  193. &:hover,
  194. &:focus,
  195. &:active {
  196. background: @sidebar-dark-bg;
  197. color: #fff;
  198. }
  199. }
  200. }
  201. }
  202. }
  203. // Heading & subheading
  204. .control-sidebar-heading,
  205. .control-sidebar-subheading {
  206. color: #fff;
  207. }
  208. // Sidebar list
  209. .control-sidebar-menu {
  210. > li {
  211. > a {
  212. &:hover {
  213. background: @sidebar-dark-hover-bg;
  214. }
  215. .menu-info {
  216. > p {
  217. color: @sidebar-dark-color;
  218. }
  219. }
  220. }
  221. }
  222. }
  223. }
  224. // Light skin
  225. .control-sidebar-light {
  226. color: lighten(@sidebar-light-color, 10%);
  227. // Background
  228. &,
  229. + .control-sidebar-bg {
  230. background: @sidebar-light-bg;
  231. border-left: 1px solid @gray-lte;
  232. }
  233. // Sidebar tabs
  234. .nav-tabs.control-sidebar-tabs {
  235. border-bottom: @gray-lte;
  236. > li {
  237. > a {
  238. background: darken(@sidebar-light-bg, 5%);
  239. color: @sidebar-light-color;
  240. // Hover and active states
  241. &,
  242. &:hover,
  243. &:focus {
  244. border-left-color: @gray-lte;
  245. border-bottom-color: @gray-lte;
  246. }
  247. &:hover,
  248. &:focus,
  249. &:active {
  250. background: darken(@sidebar-light-bg, 3%);
  251. }
  252. }
  253. // Active state
  254. &.active {
  255. > a {
  256. &,
  257. &:hover,
  258. &:focus,
  259. &:active {
  260. background: @sidebar-light-bg;
  261. color: #111;
  262. }
  263. }
  264. }
  265. }
  266. }
  267. // Heading & subheading
  268. .control-sidebar-heading,
  269. .control-sidebar-subheading {
  270. color: #111;
  271. }
  272. // Sidebar list
  273. .control-sidebar-menu {
  274. margin-left: -14px;
  275. > li {
  276. > a {
  277. &:hover {
  278. background: @sidebar-light-hover-bg;
  279. }
  280. .menu-info {
  281. > p {
  282. color: lighten(@sidebar-light-color, 10%);
  283. }
  284. }
  285. }
  286. }
  287. }
  288. }