_small-box.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. //
  2. // Component: Small Box
  3. //
  4. .small-box {
  5. @include border-radius($border-radius);
  6. @include box-shadow($card-shadow);
  7. @extend .mb-3;
  8. display: block;
  9. margin-bottom: 20px;
  10. position: relative;
  11. // content wrapper
  12. > .inner {
  13. padding: 10px;
  14. }
  15. > .small-box-footer {
  16. background: rgba($black, 0.1);
  17. color: rgba($white, 0.8);
  18. display: block;
  19. padding: 3px 0;
  20. position: relative;
  21. text-align: center;
  22. text-decoration: none;
  23. z-index: 10;
  24. &:hover {
  25. background: rgba($black, 0.15);
  26. color: $white;
  27. }
  28. }
  29. h3 {
  30. @include font-size(2.2rem);
  31. font-weight: bold;
  32. margin: 0 0 10px 0;
  33. padding: 0;
  34. white-space: nowrap;
  35. }
  36. @include media-breakpoint-up(lg) {
  37. .col-xl-2 &,
  38. .col-lg-2 &,
  39. .col-md-2 & {
  40. h3 {
  41. @include font-size(1.6rem);
  42. }
  43. }
  44. .col-xl-3 &,
  45. .col-lg-3 &,
  46. .col-md-3 & {
  47. h3 {
  48. @include font-size(1.6rem);
  49. }
  50. }
  51. }
  52. @include media-breakpoint-up(xl) {
  53. .col-xl-2 &,
  54. .col-lg-2 &,
  55. .col-md-2 & {
  56. h3 {
  57. @include font-size(2.2rem);
  58. }
  59. }
  60. .col-xl-3 &,
  61. .col-lg-3 &,
  62. .col-md-3 & {
  63. h3 {
  64. @include font-size(2.2rem);
  65. }
  66. }
  67. }
  68. p {
  69. font-size: 1rem;
  70. > small {
  71. color: $gray-100;
  72. display: block;
  73. font-size: 0.9rem;
  74. margin-top: 5px;
  75. }
  76. }
  77. h3,
  78. p {
  79. z-index: 5;
  80. }
  81. // the icon
  82. .icon {
  83. color: rgba($black, 0.15);
  84. z-index: 0;
  85. > i {
  86. font-size: 90px;
  87. position: absolute;
  88. right: 15px;
  89. top: 15px;
  90. transition: all $transition-speed linear;
  91. &.fa,
  92. &.fas,
  93. &.far,
  94. &.fab,
  95. &.glyphicon,
  96. &.ion {
  97. font-size: 70px;
  98. top: 20px;
  99. }
  100. }
  101. }
  102. // Small box hover state
  103. &:hover {
  104. text-decoration: none;
  105. // Animate icons on small box hover
  106. .icon > i {
  107. font-size: 95px;
  108. &.fa,
  109. &.fas,
  110. &.far,
  111. &.fab,
  112. &.glyphicon,
  113. &.ion {
  114. font-size: 75px;
  115. }
  116. }
  117. }
  118. }
  119. @include media-breakpoint-down(sm) {
  120. // No need for icons on very small devices
  121. .small-box {
  122. text-align: center;
  123. .icon {
  124. display: none;
  125. }
  126. p {
  127. font-size: 12px;
  128. }
  129. }
  130. }