_card.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*************************************************
  2. * Card component
  3. **************************************************/
  4. .card-simple {
  5. background: #fff;
  6. box-shadow: 0 1px 4px rgba(0,0,0,.04);
  7. border: 1px solid rgba(0,0,0,.09);
  8. border-radius: 3px;
  9. margin-top: 20px;
  10. padding: 15px 20px 15px 20px;
  11. }
  12. .card-simple:first-of-type {
  13. margin-top: 0;
  14. }
  15. .card-simple p.read-more {
  16. margin: 0;
  17. }
  18. .dark .card-simple {
  19. background: rgb(40, 42, 54);
  20. box-shadow: 0 1px 4px rgba(0,0,0,.04);
  21. border: 1px solid rgb(68, 71, 90);
  22. }
  23. /* In page listings, display the linked summaries as normal text except for the hover cursor. */
  24. a.summary-link {
  25. color: unset;
  26. text-decoration: none;
  27. }
  28. .card {
  29. margin-bottom: 1.5rem;
  30. overflow: hidden;
  31. text-overflow: ellipsis;
  32. background: #fff;
  33. box-shadow: 0 2px 4px 0 rgba(0,0,0,0.2);
  34. transition: all 0.2s ease-out;
  35. }
  36. .card .card-image {
  37. display: block;
  38. position: relative;
  39. min-height: 100px;
  40. }
  41. .card h4 {
  42. font-size: 0.9rem;
  43. font-weight: 700;
  44. line-height: 1.5;
  45. text-transform: uppercase;
  46. }
  47. .card h4 a {
  48. color: #000;
  49. border-bottom: solid 1px transparent;
  50. }
  51. .card h4 a:hover {
  52. color: #000;
  53. border-bottom: solid 1px #000;
  54. text-decoration: none;
  55. }
  56. .card .card-text {
  57. padding: 0.75rem 1rem 0.75rem;
  58. }
  59. .card .card-text p {
  60. color: rgba(0,0,0,0.54);
  61. font-size: 0.75rem;
  62. }
  63. .dark .card-text p {
  64. color: rgb(248, 248, 242);
  65. }
  66. .card p:last-child {
  67. margin-bottom: 0;
  68. }
  69. .card .card-image.hover-overlay:before {
  70. display: block;
  71. position: absolute;
  72. left: 0;
  73. top: 0;
  74. width: 100%;
  75. height: 100%;
  76. background: #fff;
  77. content: " ";
  78. opacity: 0;
  79. transition: all 0.2s ease-out;
  80. }
  81. .card .card-image.hover-overlay:after {
  82. display: block;
  83. position: absolute;
  84. left: 0;
  85. top: 50%;
  86. width: 100%;
  87. transform: translate(0, -50%);
  88. opacity: 0;
  89. transition: all 0.2s ease-out;
  90. font-family: 'Font Awesome 5 Free';
  91. font-weight: 900;
  92. content: '\f0c1';
  93. text-align: center;
  94. font-size: 3rem;
  95. color: #666;
  96. }
  97. .card:hover {
  98. box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
  99. }
  100. .card:hover .card-image.hover-overlay:before {
  101. opacity: 0.8;
  102. }
  103. .card:hover .card-image.hover-overlay:after {
  104. opacity: 0.6;
  105. }