cards.scss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. .card {
  2. box-shadow: none;
  3. @include transition();
  4. overflow: hidden;
  5. background: get-light-color('bg-card');
  6. &:hover,
  7. &:focus {
  8. box-shadow: $box-shadow;
  9. border: 1px solid get-light-color('bg-primary');
  10. @include transition();
  11. }
  12. .card-head {
  13. height: 172px;
  14. display: flex;
  15. overflow: hidden;
  16. }
  17. .card-body {
  18. text-align: left;
  19. }
  20. .card-img-top {
  21. -o-object-fit: cover;
  22. object-fit: cover;
  23. @include transition();
  24. }
  25. .card-img-sm {
  26. width: 32px;
  27. height: 32px;
  28. }
  29. .card-img-xs {
  30. width: 24px;
  31. height: 24px;
  32. }
  33. .card-footer {
  34. background: get-light-color('bg-card') !important;
  35. a.btn {
  36. text-decoration: none !important;
  37. }
  38. }
  39. }
  40. .post-card {
  41. width: 24rem;
  42. display: inline-flex;
  43. .post-card-link {
  44. text-decoration: none !important;
  45. color: get-light-color('text-color');
  46. }
  47. .card {
  48. margin: 5px;
  49. position: relative;
  50. &:hover,
  51. &:focus {
  52. .card-img-top {
  53. transform: scale(1.2);
  54. -o-object-fit: cover;
  55. object-fit: cover;
  56. @include transition();
  57. }
  58. }
  59. .card-body {
  60. padding: 1.25rem !important;
  61. padding-bottom: 0 !important;
  62. .post-summary {
  63. overflow: hidden;
  64. text-overflow: ellipsis;
  65. display: -webkit-box;
  66. max-height: 144px;
  67. /* fallback */
  68. -webkit-line-clamp: 5;
  69. /* number of lines to show */
  70. -webkit-box-orient: vertical;
  71. }
  72. }
  73. .card-footer {
  74. margin-top: auto;
  75. span {
  76. font-size: 10pt;
  77. color: get-light-color('muted-text-color') !important;
  78. padding-top: 5px;
  79. }
  80. }
  81. }
  82. }
  83. html[data-theme='dark'] {
  84. .card {
  85. background: get-dark-color('bg-card');
  86. &:hover,
  87. &:focus {
  88. border: 1px solid rgba(get-dark-color('accent-color'), 0.2);
  89. }
  90. .card-footer {
  91. background: get-dark-color('bg-card') !important;
  92. }
  93. }
  94. .post-card {
  95. .card {
  96. .card-footer {
  97. span {
  98. color: get-dark-color('muted-text-color') !important;
  99. }
  100. }
  101. }
  102. }
  103. }