_small-box.scss 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * Component: Small Box
  3. * --------------------
  4. */
  5. .small-box {
  6. @if $enable-rounded {
  7. @include border-radius($border-radius);
  8. }
  9. @if $enable-shadows {
  10. box-shadow: $card-shadow;
  11. }
  12. @extend .mb-3;
  13. position: relative;
  14. display: block;
  15. margin-bottom: 20px;
  16. // content wrapper
  17. > .inner {
  18. padding: 10px;
  19. }
  20. > .small-box-footer {
  21. position: relative;
  22. text-align: center;
  23. padding: 3px 0;
  24. color: $white;
  25. color: rgba(255, 255, 255, 0.8);
  26. display: block;
  27. z-index: 10;
  28. background: rgba(0, 0, 0, 0.1);
  29. text-decoration: none;
  30. &:hover {
  31. color: $white;
  32. background: rgba(0, 0, 0, 0.15);
  33. }
  34. }
  35. h3 {
  36. font-size: 38px;
  37. font-weight: bold;
  38. margin: 0 0 10px 0;
  39. white-space: nowrap;
  40. padding: 0;
  41. }
  42. p {
  43. font-size: 15px;
  44. > small {
  45. display: block;
  46. color: #f9f9f9;
  47. font-size: 13px;
  48. margin-top: 5px;
  49. }
  50. }
  51. h3, p {
  52. z-index: 5;
  53. }
  54. // the icon
  55. .icon {
  56. transition: all $transition-speed linear;
  57. position: absolute;
  58. top: -10px;
  59. right: 10px;
  60. z-index: 0;
  61. font-size: 90px;
  62. color: rgba(0, 0, 0, 0.15);
  63. }
  64. // Small box hover state
  65. &:hover {
  66. text-decoration: none;
  67. // Animate icons on small box hover
  68. .icon {
  69. font-size: 95px;
  70. }
  71. }
  72. }
  73. @include media-breakpoint-down(sm) {
  74. // No need for icons on very small devices
  75. .small-box {
  76. text-align: center;
  77. .icon {
  78. display: none;
  79. }
  80. p {
  81. font-size: 12px;
  82. }
  83. }
  84. }