_info-box.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. //
  2. // Component: Info Box
  3. //
  4. .info-box {
  5. @include box-shadow($card-shadow);
  6. @include border-radius($border-radius);
  7. background-color: $white;
  8. display: flex;
  9. margin-bottom: map-get($spacers, 3);
  10. min-height: 80px;
  11. padding: .5rem;
  12. position: relative;
  13. width: 100%;
  14. .progress {
  15. background-color: rgba($black, .125);
  16. height: 2px;
  17. margin: 5px 0;
  18. .progress-bar {
  19. background-color: $white;
  20. }
  21. }
  22. .info-box-icon {
  23. @if $enable-rounded {
  24. border-radius: $border-radius;
  25. }
  26. align-items: center;
  27. display: flex;
  28. font-size: 1.875rem;
  29. justify-content: center;
  30. text-align: center;
  31. width: 70px;
  32. > img {
  33. max-width: 100%;
  34. }
  35. }
  36. .info-box-content {
  37. display: flex;
  38. flex-direction: column;
  39. justify-content: center;
  40. line-height: 1.8;
  41. flex: 1;
  42. padding: 0 10px;
  43. overflow: hidden;
  44. }
  45. .info-box-number {
  46. display: block;
  47. margin-top: .25rem;
  48. font-weight: $font-weight-bold;
  49. }
  50. .progress-description,
  51. .info-box-text {
  52. display: block;
  53. overflow: hidden;
  54. text-overflow: ellipsis;
  55. white-space: nowrap;
  56. }
  57. @each $name, $color in $theme-colors {
  58. .info-box {
  59. .bg-#{$name},
  60. .bg-gradient-#{$name} {
  61. color: color-yiq($color);
  62. .progress-bar {
  63. background-color: color-yiq($color);
  64. }
  65. }
  66. }
  67. }
  68. .info-box-more {
  69. display: block;
  70. }
  71. .progress-description {
  72. margin: 0;
  73. }
  74. @include media-breakpoint-up(md) {
  75. .col-xl-2 &,
  76. .col-lg-2 &,
  77. .col-md-2 & {
  78. .progress-description {
  79. display: none;
  80. }
  81. }
  82. .col-xl-3 &,
  83. .col-lg-3 &,
  84. .col-md-3 & {
  85. .progress-description {
  86. display: none;
  87. }
  88. }
  89. }
  90. @include media-breakpoint-up(lg) {
  91. .col-xl-2 &,
  92. .col-lg-2 &,
  93. .col-md-2 & {
  94. .progress-description {
  95. @include font-size(.75rem);
  96. display: block;
  97. }
  98. }
  99. .col-xl-3 &,
  100. .col-lg-3 &,
  101. .col-md-3 & {
  102. .progress-description {
  103. @include font-size(.75rem);
  104. display: block;
  105. }
  106. }
  107. }
  108. @include media-breakpoint-up(xl) {
  109. .col-xl-2 &,
  110. .col-lg-2 &,
  111. .col-md-2 & {
  112. .progress-description {
  113. @include font-size(1rem);
  114. display: block;
  115. }
  116. }
  117. .col-xl-3 &,
  118. .col-lg-3 &,
  119. .col-md-3 & {
  120. .progress-description {
  121. @include font-size(1rem);
  122. display: block;
  123. }
  124. }
  125. }
  126. }
  127. @include dark-mode () {
  128. .info-box {
  129. background-color: $dark;
  130. color: $white;
  131. @each $name, $color in $theme-colors-alt {
  132. .info-box {
  133. .bg-#{$name},
  134. .bg-gradient-#{$name} {
  135. color: color-yiq($color);
  136. .progress-bar {
  137. background-color: color-yiq($color);
  138. }
  139. }
  140. }
  141. }
  142. }
  143. }