card.css

Same filename in this branch
  1. 10 core/profiles/demo_umami/themes/umami/components/card/card.css
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/css/components/content/card/card.css
  2. 9 core/themes/claro/css/components/card.css
  3. 8.9.x core/profiles/demo_umami/themes/umami/css/components/content/card/card.css
  4. 8.9.x core/themes/claro/css/components/card.css
  5. 11.x core/profiles/demo_umami/themes/umami/components/card/card.css
  6. 11.x core/themes/claro/css/components/card.css

Card.

File

core/themes/claro/css/components/card.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Card.
  10. */
  11. :root {
  12. --card-bg-color: var(--color-white);
  13. --card-border-size: 1px;
  14. --card-border-color: var(--color-gray-200-o-80);
  15. --card-border-radius-size: var(--base-border-radius);
  16. --card-image-border-radius-size: calc(var(--card-border-radius-size) - var(--card-border-size));
  17. --card-box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.1);
  18. }
  19. .card {
  20. display: flex;
  21. flex-direction: column;
  22. align-items: stretch;
  23. justify-items: flex-start;
  24. padding: 0;
  25. border: var(--card-border-size) solid var(--card-border-color);
  26. border-radius: var(--card-border-radius-size);
  27. background-color: var(--card-bg-color);
  28. box-shadow: var(--card-box-shadow);
  29. }
  30. /* 588px theme screenshot width */
  31. @media screen and (min-width: 36.75rem) {
  32. .card--horizontal {
  33. flex-direction: row;
  34. }
  35. .toolbar-tray-open.toolbar-vertical.toolbar-fixed .card--horizontal {
  36. flex-direction: column;
  37. }
  38. }
  39. /* 53.75rem it is width of screenshot image + toolbar width(15rem) + 2rem of margins. */
  40. @media screen and (min-width: 53.75rem) {
  41. .toolbar-tray-open.toolbar-vertical.toolbar-fixed .card--horizontal {
  42. flex-direction: row;
  43. }
  44. }
  45. /**
  46. * Card image.
  47. */
  48. .card__image {
  49. overflow: hidden;
  50. border-radius: var(--card-image-border-radius-size) var(--card-image-border-radius-size) 0 0;
  51. line-height: 0;
  52. }
  53. @media screen and (min-width: 36.75rem) {
  54. .card--horizontal .card__image {
  55. flex-basis: 35%;
  56. border-start-start-radius: var(--card-image-border-radius-size);
  57. border-start-end-radius: 0;
  58. border-end-start-radius: var(--card-image-border-radius-size);
  59. border-end-end-radius: 0;
  60. }
  61. }
  62. /* 53.75rem it is width of screenshot image + toolbar width(15rem) + 2rem of margins. */
  63. @media screen and (max-width: 53.75rem) {
  64. .toolbar-tray-open.toolbar-vertical.toolbar-fixed .card--horizontal .card__image {
  65. flex-basis: auto;
  66. }
  67. }
  68. @media screen and (min-width: 85.375rem) {
  69. .card--horizontal .card__image {
  70. flex-basis: 45%;
  71. }
  72. /* .card--vertical .card__image {
  73. flex-basis: auto;
  74. } */
  75. }
  76. /**
  77. * Card content.
  78. */
  79. .card__content-wrapper {
  80. display: flex;
  81. flex-direction: column;
  82. flex-grow: 1;
  83. flex-shrink: 0;
  84. box-sizing: border-box;
  85. padding: var(--space-l);
  86. }
  87. @media screen and (min-width: 36.75rem) {
  88. .card--horizontal .card__content-wrapper {
  89. flex-basis: 65%;
  90. }
  91. /* Card content with image. */
  92. .card--horizontal .card__image ~ .card__content-wrapper {
  93. padding-inline-start: var(--space-m);
  94. }
  95. }
  96. @media screen and (max-width: 53.75rem) {
  97. .toolbar-tray-open.toolbar-vertical.toolbar-fixed .card--horizontal .card__content-wrapper {
  98. flex-basis: auto;
  99. }
  100. }
  101. @media screen and (min-width: 85.375rem) {
  102. .card--horizontal .card__content-wrapper {
  103. flex-basis: 55%;
  104. }
  105. }
  106. /**
  107. * Card content.
  108. */
  109. .card__content {
  110. flex-grow: 1;
  111. }
  112. /**
  113. * Card content items (title, description).
  114. */
  115. .card__content-item {
  116. margin-block: 0 var(--space-m);
  117. }
  118. .card__content-item:last-child {
  119. margin-block-end: 0;
  120. }
  121. /**
  122. * Card footer.
  123. */
  124. .card__footer {
  125. order: 100;
  126. margin-block-start: var(--space-l);
  127. }
  128. .card__footer .action-links {
  129. margin-block: 0;
  130. text-align: right; /* LTR */
  131. }
  132. [dir="rtl"] :is(.card__footer .action-links) {
  133. text-align: left;
  134. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.