boxes.less 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. /*
  2. * Component: Box
  3. * --------------
  4. */
  5. .box {
  6. position: relative;
  7. .border-radius(@box-border-radius);
  8. background: #ffffff;
  9. border-top: 3px solid @box-default-border-top-color;
  10. margin-bottom: 20px;
  11. width: 100%;
  12. box-shadow: @box-boxshadow;
  13. // Box color variations
  14. &.box-primary {
  15. border-top-color: @light-blue;
  16. }
  17. &.box-info {
  18. border-top-color: @aqua;
  19. }
  20. &.box-danger {
  21. border-top-color: @red;
  22. }
  23. &.box-warning {
  24. border-top-color: @yellow;
  25. }
  26. &.box-success {
  27. border-top-color: @green;
  28. }
  29. &.box-default {
  30. border-top-color: @gray;
  31. }
  32. // collapsed mode
  33. &.collapsed-box {
  34. .box-body,
  35. .box-footer {
  36. display: none;
  37. }
  38. }
  39. .nav-stacked {
  40. > li {
  41. border-bottom: 1px solid @box-border-color;
  42. margin: 0;
  43. &:last-of-type {
  44. border-bottom: none;
  45. }
  46. }
  47. }
  48. // fixed height to 300px
  49. &.height-control {
  50. .box-body {
  51. max-height: 300px;
  52. overflow: auto;
  53. }
  54. }
  55. .border-right {
  56. border-right: 1px solid @box-border-color;
  57. }
  58. .border-left {
  59. border-left: 1px solid @box-border-color;
  60. }
  61. //SOLID BOX
  62. //---------
  63. //use this class to get a colored header and borders
  64. &.box-solid {
  65. border-top: 0px;
  66. > .box-header {
  67. .btn.btn-default {
  68. background: transparent;
  69. }
  70. .btn,
  71. a {
  72. &:hover {
  73. background: rgba(0,0,0,0.1)!important;
  74. }
  75. }
  76. }
  77. // Box color variations
  78. &.box-default {
  79. .box-solid-variant(@gray, #444);
  80. }
  81. &.box-primary {
  82. .box-solid-variant(@light-blue);
  83. }
  84. &.box-info {
  85. .box-solid-variant(@aqua);
  86. }
  87. &.box-danger {
  88. .box-solid-variant(@red);
  89. }
  90. &.box-warning {
  91. .box-solid-variant(@yellow);
  92. }
  93. &.box-success {
  94. .box-solid-variant(@green);
  95. }
  96. > .box-header > .box-tools .btn {
  97. border: 0;
  98. box-shadow: none;
  99. }
  100. // Fix font color for tiles
  101. &[class*='bg'] {
  102. > .box-header {
  103. color: #fff;
  104. }
  105. }
  106. }
  107. //BOX GROUP
  108. .box-group {
  109. > .box {
  110. margin-bottom: 5px;
  111. }
  112. }
  113. // jQuery Knob in a box
  114. .knob-label {
  115. text-align: center;
  116. color: #333;
  117. font-weight: 100;
  118. font-size: 12px;
  119. margin-bottom: 0.3em;
  120. }
  121. // Box overlay for LOADING STATE effect
  122. > .overlay,
  123. > .loading-img {
  124. position: absolute;
  125. top: 0;
  126. left: 0;
  127. width: 100%;
  128. height: 100%;
  129. }
  130. .overlay {
  131. z-index: 1010;
  132. background: rgba(255, 255, 255, 0.7);
  133. .border-radius(@box-border-radius);
  134. > .fa {
  135. position: absolute;
  136. top: 50%;
  137. left: 50%;
  138. margin-left: -15px;
  139. margin-top: -15px;
  140. color: #000;
  141. font-size: 30px;
  142. }
  143. }
  144. .overlay.dark {
  145. background: rgba(0, 0, 0, 0.5);
  146. }
  147. }
  148. //Add clearfix to header, body and footer
  149. .box-header,
  150. .box-body,
  151. .box-footer {
  152. .clearfix();
  153. }
  154. //Box header
  155. .box-header {
  156. color: #444;
  157. display: block;
  158. padding: @box-padding;
  159. position: relative;
  160. //Add bottom border
  161. &.with-border {
  162. border-bottom: 1px solid @box-border-color;
  163. .collapsed-box & {
  164. border-bottom: none;
  165. }
  166. }
  167. //Icons and box title
  168. > .fa,
  169. > .glyphicon,
  170. > .ion,
  171. .box-title {
  172. display: inline-block;
  173. font-size: 18px;
  174. margin: 0;
  175. line-height: 1;
  176. }
  177. > .fa,
  178. > .glyphicon,
  179. > .ion {
  180. margin-right: 5px;
  181. }
  182. > .box-tools {
  183. position: absolute;
  184. right: 10px;
  185. top: 5px;
  186. [data-toggle="tooltip"] {
  187. position: relative;
  188. }
  189. //float: none!important;
  190. &.pull-right {
  191. .dropdown-menu {
  192. right: 0;
  193. left: auto;
  194. }
  195. }
  196. }
  197. }
  198. //Box Tools Buttons
  199. .btn-box-tool {
  200. padding: 5px;
  201. font-size: 12px;
  202. background: transparent;
  203. box-shadow: none!important;
  204. color: darken(@box-default-border-top-color, 20%);
  205. .open &,
  206. &:hover {
  207. color: darken(@box-default-border-top-color, 40%);
  208. }
  209. &:active {
  210. outline: none!important;
  211. }
  212. }
  213. //Box Body
  214. .box-body {
  215. .border-radius(0; 0; @box-border-radius; @box-border-radius);
  216. padding: @box-padding;
  217. .no-header & {
  218. .border-top-radius(@box-border-radius);
  219. }
  220. // Tables within the box body
  221. > .table {
  222. margin-bottom: 0;
  223. }
  224. // Charts
  225. > .chart {
  226. position: relative;
  227. overflow: hidden;
  228. width: 100%;
  229. svg,
  230. canvas {
  231. width: 100%!important;
  232. }
  233. }
  234. // Calendar within the box body
  235. .fc {
  236. margin-top: 5px;
  237. }
  238. .full-width-chart {
  239. margin: -19px;
  240. }
  241. &.no-padding .full-width-chart {
  242. margin: -9px;
  243. }
  244. .box-pane {
  245. .border-radius(0; 0; @box-border-radius; 0);
  246. }
  247. .box-pane-right {
  248. .border-radius(0; 0; 0; @box-border-radius);
  249. }
  250. }
  251. //Box footer
  252. .box-footer {
  253. .border-radius(0; 0; @box-border-radius; @box-border-radius);
  254. border-top: 1px solid @box-border-color;
  255. padding: @box-padding;
  256. background-color: @box-footer-bg;
  257. }
  258. .chart-legend {
  259. &:extend(.list-unstyled);
  260. margin: 10px 0;
  261. > li {
  262. @media (max-width: @screen-sm-max) {
  263. float: left;
  264. margin-right: 10px;
  265. }
  266. }
  267. }
  268. //Widgets
  269. //-----------
  270. /* Widget: TODO LIST */
  271. .todo-list {
  272. margin: 0;
  273. padding: 0px 0px;
  274. list-style: none;
  275. overflow: auto;
  276. // Todo list element
  277. > li {
  278. .border-radius(2px);
  279. padding: 10px;
  280. background: #f4f4f4;
  281. margin-bottom: 2px;
  282. border-left: 2px solid #e6e7e8;
  283. color: #444;
  284. &:last-of-type {
  285. margin-bottom: 0;
  286. }
  287. // Color varaity
  288. &.danger {
  289. border-left-color: @red;
  290. }
  291. &.warning {
  292. border-left-color: @yellow;
  293. }
  294. &.info {
  295. border-left-color: @aqua;
  296. }
  297. &.success {
  298. border-left-color: @green;
  299. }
  300. &.primary {
  301. border-left-color: @light-blue;
  302. }
  303. > input[type='checkbox'] {
  304. margin: 0 10px 0 5px;
  305. }
  306. .text {
  307. display: inline-block;
  308. margin-left: 5px;
  309. font-weight: 600;
  310. }
  311. // Time labels
  312. .label {
  313. margin-left: 10px;
  314. font-size: 9px;
  315. }
  316. // Tools and options box
  317. .tools {
  318. display: none;
  319. float: right;
  320. color: @red;
  321. // icons
  322. > .fa, > .glyphicon, > .ion {
  323. margin-right: 5px;
  324. cursor: pointer;
  325. }
  326. }
  327. &:hover .tools {
  328. display: inline-block;
  329. }
  330. &.done {
  331. color: #999;
  332. .text {
  333. text-decoration: line-through;
  334. font-weight: 500;
  335. }
  336. .label {
  337. background: @gray!important;
  338. }
  339. }
  340. }
  341. .handle {
  342. display: inline-block;
  343. cursor: move;
  344. margin: 0 5px;
  345. }
  346. }
  347. // END TODO WIDGET
  348. /* Chat widget (DEPRECATED - this will be removed in the next major release. Use Direct Chat instead)*/
  349. .chat {
  350. padding: 5px 20px 5px 10px;
  351. .item {
  352. .clearfix();
  353. margin-bottom: 10px;
  354. // The image
  355. > img {
  356. //display: inline-block;
  357. width: 40px;
  358. height: 40px;
  359. border: 2px solid transparent;
  360. .border-radius(50%)!important;
  361. &.online {
  362. border: 2px solid @green;
  363. }
  364. &.offline {
  365. border: 2px solid @red;
  366. }
  367. }
  368. // The message body
  369. > .message {
  370. margin-left: 55px;
  371. margin-top: -40px;
  372. > .name {
  373. display: block;
  374. font-weight: 600;
  375. }
  376. }
  377. // The attachment
  378. > .attachment {
  379. .border-radius(@attachment-border-radius);
  380. background: #f4f4f4;
  381. margin-left: 65px;
  382. margin-right: 15px;
  383. padding: 10px;
  384. > h4 {
  385. margin: 0 0 5px 0;
  386. font-weight: 600;
  387. font-size: 14px;
  388. }
  389. > p, > .filename {
  390. font-weight: 600;
  391. font-size: 13px;
  392. font-style: italic;
  393. margin: 0;
  394. }
  395. .clearfix();
  396. }
  397. }
  398. }
  399. //END CHAT WIDGET
  400. //Input in box
  401. .box-input {
  402. max-width: 200px;
  403. }