_small-box.scss 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. font-size: 38px;
  33. font-weight: bold;
  34. margin: 0 0 10px 0;
  35. padding: 0;
  36. white-space: nowrap;
  37. }
  38. p {
  39. font-size: 15px;
  40. > small {
  41. color: #f9f9f9;
  42. display: block;
  43. font-size: 13px;
  44. margin-top: 5px;
  45. }
  46. }
  47. h3, p {
  48. z-index: 5;
  49. }
  50. // the icon
  51. .icon {
  52. color: rgba($black, 0.15);
  53. z-index: 0;
  54. > i {
  55. font-size: 90px;
  56. position: absolute;
  57. right: 15px;
  58. top: 15px;
  59. transition: all $transition-speed linear;
  60. &.fa,
  61. &.fas,
  62. &.far,
  63. &.fab,
  64. &.glyphicon,
  65. &.ion {
  66. font-size: 70px;
  67. top: 20px;
  68. }
  69. }
  70. }
  71. // Small box hover state
  72. &:hover {
  73. text-decoration: none;
  74. // Animate icons on small box hover
  75. .icon > i {
  76. font-size: 95px;
  77. &.fa,
  78. &.fas,
  79. &.far,
  80. &.fab,
  81. &.glyphicon,
  82. &.ion {
  83. font-size: 75px;
  84. }
  85. }
  86. }
  87. }
  88. @include media-breakpoint-down(sm) {
  89. // No need for icons on very small devices
  90. .small-box {
  91. text-align: center;
  92. .icon {
  93. display: none;
  94. }
  95. p {
  96. font-size: 12px;
  97. }
  98. }
  99. }