_info-box.scss 2.2 KB

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