control-sidebar.less 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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: 900;
  9. top: 0;
  10. right: 0;
  11. bottom: 0;
  12. width: @control-sidebar-width;
  13. }
  14. //Transitions
  15. .control-sidebar-bg,
  16. .control-sidebar {
  17. .translate(@control-sidebar-width, 0);
  18. .transition-transform(@transition-speed ease-in-out);
  19. }
  20. //The sidebar
  21. .control-sidebar {
  22. position: absolute;
  23. top: 0;
  24. padding-top: @navbar-height;
  25. right: 0;
  26. width: @control-sidebar-width;
  27. z-index: 1010;
  28. //Fix position after header collapse
  29. @media (max-width: @screen-sm) {
  30. padding-top: @navbar-height + 50;
  31. }
  32. //Tab panes
  33. > .tab-content {
  34. padding: 10px 15px;
  35. }
  36. //Open state with slide over content effect
  37. &.control-sidebar-open {
  38. &,
  39. + .control-sidebar-bg {
  40. .translate(0, 0);
  41. }
  42. }
  43. }
  44. //Open without slide over content
  45. .control-sidebar-open {
  46. .control-sidebar-bg,
  47. .control-sidebar {
  48. .translate(0,0);
  49. }
  50. @media(min-width: @screen-sm) {
  51. .content-wrapper,
  52. .right-side,
  53. .main-footer {
  54. margin-right: @control-sidebar-width;
  55. }
  56. }
  57. }
  58. //Control sidebar tabs
  59. .control-sidebar-tabs {
  60. > li {
  61. &:first-of-type > a {
  62. margin-left: 1px;
  63. &,
  64. &:hover {
  65. border-left-width: 0!important;
  66. }
  67. }
  68. > a {
  69. .border-radius(0)!important;
  70. //Hover and active states
  71. &,
  72. &:hover {
  73. border-top: none;
  74. border-right: none;
  75. border-left: 1px solid transparent!important;
  76. border-bottom: 1px solid transparent!important;
  77. }
  78. .icon {
  79. font-size: 16px;
  80. }
  81. }
  82. //Active state
  83. &.active {
  84. > a {
  85. &,
  86. &:hover,
  87. &:focus,
  88. &:active {
  89. border-top: none!important;
  90. border-right: none!important;
  91. border-bottom: none!important;
  92. }
  93. }
  94. }
  95. }
  96. //Remove responsiveness on small screens
  97. @media(max-width: @screen-sm) {
  98. display: table;
  99. >li {
  100. display: table-cell!important;
  101. }
  102. }
  103. }
  104. //Headings in the sidebar content
  105. .control-sidebar-heading {
  106. font-weight: 400;
  107. font-size: 16px;
  108. padding: 10px 0;
  109. margin-bottom: 10px;
  110. }
  111. //Subheadings
  112. .control-sidebar-subheading {
  113. display: block;
  114. font-weight: 400;
  115. font-size: 14px;
  116. }
  117. //Control Sidebar Menu
  118. .control-sidebar-menu {
  119. list-style: none;
  120. padding: 0;
  121. margin: 0 -15px;
  122. > li > a {
  123. .clearfix();
  124. display: block;
  125. padding: 10px 15px;
  126. > .control-sidebar-subheading {
  127. margin-top: 0;
  128. }
  129. }
  130. .menu-icon {
  131. float: left;
  132. width: 35px;
  133. height: 35px;
  134. border-radius: 50%;
  135. text-align: center;
  136. line-height: 35px;
  137. }
  138. .menu-info {
  139. margin-left: 45px;
  140. margin-top: 3px;
  141. > .control-sidebar-subheading {
  142. margin: 0;
  143. }
  144. > p {
  145. margin: 0;
  146. font-size: 11px;
  147. }
  148. }
  149. .progress {
  150. margin: 0;
  151. }
  152. }
  153. //Dark skin
  154. .control-sidebar-dark {
  155. color: @sidebar-dark-color;
  156. // Background
  157. &,
  158. + .control-sidebar-bg {
  159. background: @sidebar-dark-bg;
  160. }
  161. // Sidebar tabs
  162. .control-sidebar-tabs {
  163. border-bottom: darken(@sidebar-dark-bg, 3%);
  164. > li {
  165. > a {
  166. background: darken(@sidebar-dark-bg, 5%);
  167. color: @sidebar-dark-color;
  168. //Hover and active states
  169. &,
  170. &:hover {
  171. border-left-color: darken(@sidebar-dark-bg, 7%)!important;
  172. border-bottom-color: darken(@sidebar-dark-bg, 7%)!important;
  173. }
  174. &:hover,
  175. &:focus,
  176. &:active {
  177. background: darken(@sidebar-dark-bg, 3%);
  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. .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. border-left-color: @gray!important;
  235. border-bottom-color: @gray!important;
  236. }
  237. &:hover,
  238. &:focus,
  239. &:active {
  240. background: darken(@sidebar-light-bg, 3%);
  241. }
  242. }
  243. //Active state
  244. &.active {
  245. > a {
  246. &,
  247. &:hover,
  248. &:focus,
  249. &:active {
  250. background: @sidebar-light-bg;
  251. color: #111;
  252. }
  253. }
  254. }
  255. }
  256. }
  257. //Heading & subheading
  258. .control-sidebar-heading,
  259. .control-sidebar-subheading {
  260. color: #111;
  261. }
  262. //Sidebar list
  263. .control-sidebar-menu {
  264. margin-left: -14px;
  265. > li {
  266. > a {
  267. &:hover {
  268. background: @sidebar-light-hover-bg;
  269. }
  270. .menu-info {
  271. > p {
  272. color: lighten(@sidebar-light-color, 10%);
  273. }
  274. }
  275. }
  276. }
  277. }
  278. }