_small-box.scss 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. position: relative;
  10. display: block;
  11. margin-bottom: 20px;
  12. // content wrapper
  13. > .inner {
  14. padding: 10px;
  15. }
  16. > .small-box-footer {
  17. position: relative;
  18. text-align: center;
  19. padding: 3px 0;
  20. color: $white;
  21. color: rgba(255, 255, 255, 0.8);
  22. display: block;
  23. z-index: 10;
  24. background: rgba(0, 0, 0, 0.1);
  25. text-decoration: none;
  26. &:hover {
  27. color: $white;
  28. background: rgba(0, 0, 0, 0.15);
  29. }
  30. }
  31. h3 {
  32. font-size: 38px;
  33. font-weight: bold;
  34. margin: 0 0 10px 0;
  35. white-space: nowrap;
  36. padding: 0;
  37. }
  38. p {
  39. font-size: 15px;
  40. > small {
  41. display: block;
  42. color: #f9f9f9;
  43. font-size: 13px;
  44. margin-top: 5px;
  45. }
  46. }
  47. h3, p {
  48. z-index: 5;
  49. }
  50. // the icon
  51. .icon {
  52. z-index: 0;
  53. color: rgba(0, 0, 0, 0.15);
  54. > i {
  55. transition: all $transition-speed linear;
  56. position: absolute;
  57. top: 15px;
  58. right: 15px;
  59. font-size: 90px;
  60. &.fa,
  61. &.fas,
  62. &.far,
  63. &.fab {
  64. font-size: 70px;
  65. top: 20px;
  66. }
  67. }
  68. }
  69. // Small box hover state
  70. &:hover {
  71. text-decoration: none;
  72. // Animate icons on small box hover
  73. .icon > i {
  74. font-size: 95px;
  75. &.fa,
  76. &.fas,
  77. &.far,
  78. &.fab {
  79. font-size: 75px;
  80. }
  81. }
  82. }
  83. }
  84. @include media-breakpoint-down(sm) {
  85. // No need for icons on very small devices
  86. .small-box {
  87. text-align: center;
  88. .icon {
  89. display: none;
  90. }
  91. p {
  92. font-size: 12px;
  93. }
  94. }
  95. }