control-sidebar.less 5.4 KB

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