_cards.scss 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. /*
  2. * Component: Box
  3. * --------------
  4. */
  5. .card {
  6. @extend .mb-3;
  7. @if $enable-shadows {
  8. box-shadow: $card-shadow;
  9. }
  10. &.bg-dark {
  11. &,
  12. .card-body {
  13. color: $white;
  14. }
  15. }
  16. // collapsed mode
  17. &.collapsed-card {
  18. .card-body,
  19. .card-footer {
  20. display: none;
  21. }
  22. }
  23. .nav.flex-column {
  24. > li {
  25. border-bottom: 1px solid $card-border-color;
  26. margin: 0;
  27. &:last-of-type {
  28. border-bottom: none;
  29. }
  30. }
  31. }
  32. // fixed height to 300px
  33. &.height-control {
  34. .card-body {
  35. max-height: 300px;
  36. overflow: auto;
  37. }
  38. }
  39. .border-right {
  40. border-right: 1px solid $card-border-color;
  41. }
  42. .border-left {
  43. border-left: 1px solid $card-border-color;
  44. }
  45. }
  46. .card,
  47. .overlay-wrapper {
  48. // Box overlay for LOADING STATE effect
  49. > .overlay,
  50. > .loading-img {
  51. position: absolute;
  52. top: 0;
  53. left: 0;
  54. width: 100%;
  55. height: 100%;
  56. }
  57. .overlay {
  58. z-index: 50;
  59. background: rgba(255, 255, 255, 0.7);
  60. @include border-radius($border-radius);
  61. > .fa {
  62. position: absolute;
  63. top: 50%;
  64. left: 50%;
  65. margin-left: -15px;
  66. margin-top: -15px;
  67. color: #000;
  68. font-size: 30px;
  69. }
  70. }
  71. .overlay.dark {
  72. background: rgba(0, 0, 0, 0.5);
  73. }
  74. }
  75. // Add clearfix to header, body and footer
  76. .card-header,
  77. .card-body,
  78. .card-footer {
  79. @include clearfix();
  80. }
  81. // Box header
  82. .card-header {
  83. position: relative;
  84. background-color: transparent;
  85. border-bottom: 1px solid $card-border-color;
  86. @if $enable-rounded {
  87. @include border-top-radius($border-radius);
  88. }
  89. .collapsed-card & {
  90. border-bottom: none;
  91. }
  92. > .card-tools {
  93. position: absolute;
  94. right: 1rem;
  95. top: .5rem;
  96. [data-toggle="tooltip"] {
  97. position: relative;
  98. }
  99. }
  100. }
  101. .card-title {
  102. font-size: $card-title-font-size;
  103. font-weight: $card-title-font-weight;
  104. margin: 0;
  105. }
  106. // Box Tools Buttons
  107. .btn-tool {
  108. padding: .25rem .5rem;
  109. font-size: $font-size-sm;
  110. background: transparent;
  111. color: $gray-500;
  112. .btn-group.show &,
  113. &:hover {
  114. color: $gray-700;
  115. }
  116. .show &,
  117. &:focus {
  118. box-shadow: none !important;
  119. }
  120. }
  121. // Box Body
  122. .card-body {
  123. // @include border-radius-sides(0, 0, $border-radius, $border-radius);
  124. .no-header & {
  125. // @include border-top-radius($border-radius);
  126. }
  127. // Tables within the box body
  128. > .table {
  129. margin-bottom: 0;
  130. > thead > tr > th,
  131. > thead > tr > td {
  132. border-top-width: 0;
  133. }
  134. }
  135. // Calendar within the box body
  136. .fc {
  137. margin-top: 5px;
  138. }
  139. .full-width-chart {
  140. margin: -19px;
  141. }
  142. &.p-0 .full-width-chart {
  143. margin: -9px;
  144. }
  145. }
  146. .chart-legend {
  147. @extend .list-unstyled;
  148. margin: 10px 0;
  149. > li {
  150. @media (max-width: map-get($grid-breakpoints, sm)) {
  151. float: left;
  152. margin-right: 10px;
  153. }
  154. }
  155. }
  156. // Comment Box
  157. .card-comments {
  158. background: #f7f7f7;
  159. .card-comment {
  160. @include clearfix();
  161. padding: 8px 0;
  162. border-bottom: 1px solid #eee;
  163. &:last-of-type {
  164. border-bottom: 0;
  165. }
  166. &:first-of-type {
  167. padding-top: 0;
  168. }
  169. img {
  170. @extend .img-sm;
  171. float: left;
  172. }
  173. }
  174. .comment-text {
  175. margin-left: 40px;
  176. color: #555;
  177. }
  178. .username {
  179. color: #444;
  180. display: block;
  181. font-weight: 600;
  182. }
  183. .text-muted {
  184. font-weight: 400;
  185. font-size: 12px;
  186. }
  187. }
  188. // Widgets
  189. //-----------
  190. // Widget: TODO LIST
  191. .todo-list {
  192. margin: 0;
  193. padding: 0;
  194. list-style: none;
  195. overflow: auto;
  196. // Todo list element
  197. > li {
  198. @include border-radius(2px);
  199. padding: 10px;
  200. background: #f4f4f4;
  201. margin-bottom: 2px;
  202. border-left: 2px solid #e6e7e8;
  203. color: #444;
  204. &:last-of-type {
  205. margin-bottom: 0;
  206. }
  207. > input[type='checkbox'] {
  208. margin: 0 10px 0 5px;
  209. }
  210. .text {
  211. display: inline-block;
  212. margin-left: 5px;
  213. font-weight: 600;
  214. }
  215. // Time labels
  216. .label {
  217. margin-left: 10px;
  218. font-size: 9px;
  219. }
  220. // Tools and options box
  221. .tools {
  222. display: none;
  223. float: right;
  224. color: theme-color("danger");
  225. // icons
  226. > .fa, > .glyphicon, > .ion {
  227. margin-right: 5px;
  228. cursor: pointer;
  229. }
  230. }
  231. &:hover .tools {
  232. display: inline-block;
  233. }
  234. &.done {
  235. color: #999;
  236. .text {
  237. text-decoration: line-through;
  238. font-weight: 500;
  239. }
  240. .label {
  241. background: $gray-500 !important;
  242. }
  243. }
  244. }
  245. // Color varaity
  246. .danger {
  247. border-left-color: theme-color("danger");
  248. }
  249. .warning {
  250. border-left-color: theme-color("warning");
  251. }
  252. .info {
  253. border-left-color: theme-color("info");
  254. }
  255. .success {
  256. border-left-color: theme-color("success");
  257. }
  258. .primary {
  259. border-left-color: theme-color("primary");
  260. }
  261. .handle {
  262. display: inline-block;
  263. cursor: move;
  264. margin: 0 5px;
  265. }
  266. }
  267. // END TODO WIDGET
  268. // Input in box
  269. .card-input {
  270. max-width: 200px;
  271. }
  272. @each $name, $color in $theme-colors {
  273. .card-#{$name} {
  274. &:not(.card-outline) {
  275. .card-header {
  276. background-color: $color;
  277. &,
  278. a {
  279. color: color-yiq($color);
  280. }
  281. }
  282. }
  283. &.card-outline {
  284. border-top: 3px solid $color;
  285. }
  286. }
  287. .bg-#{$name},
  288. .bg-#{$name}-gradient,
  289. .card-#{$name}:not(.card-outline) {
  290. .btn-tool {
  291. color: rgba(color-yiq($color), 0.8);
  292. &:hover {
  293. color: color-yiq($color);
  294. }
  295. }
  296. }
  297. }