_small-box.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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: rgba($black, 0.1);
  16. color: rgba($white, 0.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: rgba($black, 0.15);
  25. color: $white;
  26. }
  27. }
  28. h3 {
  29. @include font-size(2.2rem);
  30. font-weight: bold;
  31. margin: 0 0 10px 0;
  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: 0.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, 0.15);
  83. z-index: 0;
  84. > i {
  85. font-size: 90px;
  86. position: absolute;
  87. right: 15px;
  88. top: 15px;
  89. transition: all $transition-speed linear;
  90. &.fa,
  91. &.fas,
  92. &.far,
  93. &.fab,
  94. &.glyphicon,
  95. &.ion {
  96. font-size: 70px;
  97. top: 20px;
  98. }
  99. }
  100. }
  101. // Small box hover state
  102. &:hover {
  103. text-decoration: none;
  104. // Animate icons on small box hover
  105. .icon > i {
  106. font-size: 95px;
  107. &.fa,
  108. &.fas,
  109. &.far,
  110. &.fab,
  111. &.glyphicon,
  112. &.ion {
  113. font-size: 75px;
  114. }
  115. }
  116. }
  117. }
  118. @include media-breakpoint-down(sm) {
  119. // No need for icons on very small devices
  120. .small-box {
  121. text-align: center;
  122. .icon {
  123. display: none;
  124. }
  125. p {
  126. font-size: 12px;
  127. }
  128. }
  129. }