control-sidebar.less 5.7 KB

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