_small-box.scss 2.3 KB

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