_small-box.scss 2.2 KB

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