small-box.less 1.4 KB

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