_cards.scss 5.0 KB

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