_cards.scss 4.9 KB

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