card-list.css

Same filename in other branches
  1. 9 core/themes/claro/css/layout/card-list.css
  2. 10 core/themes/claro/css/layout/card-list.css
  3. 11.x core/themes/claro/css/layout/card-list.css

Cards list.

File

core/themes/claro/css/layout/card-list.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/2815083
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Cards list.
  10. */
  11. :root {
  12. /* Using 100% as base causes issues in IE11. */
  13. }
  14. .card-list {
  15. display: flex;
  16. flex-direction: column;
  17. }
  18. .card-list--two-cols,
  19. .card-list--four-cols {
  20. flex-direction: row;
  21. flex-wrap: wrap;
  22. align-items: stretch;
  23. justify-content: flex-start;
  24. }
  25. .card-list__item {
  26. box-sizing: border-box;
  27. margin-bottom: 1rem;
  28. }
  29. .card-list--two-cols .card-list__item,
  30. .card-list--four-cols .card-list__item {
  31. flex-basis: 100%;
  32. }
  33. /* 36.75rem theme screenshot width */
  34. @media screen and (min-width: 36.75rem) {
  35. .card-list--four-cols .card-list__item {
  36. flex-basis: calc(49.95% - 0.5rem);
  37. max-width: calc(49.95% - 0.5rem);
  38. }
  39. .card-list--four-cols .card-list__item {
  40. margin-right: 1rem;
  41. }
  42. [dir="rtl"] .card-list--four-cols .card-list__item {
  43. margin-right: 0;
  44. margin-left: 1rem;
  45. }
  46. .card-list--four-cols .card-list__item:nth-child(even) {
  47. margin-right: 0;
  48. }
  49. [dir="rtl"] .card-list--four-cols .card-list__item:nth-child(even) {
  50. margin-right: 0;
  51. margin-left: 0;
  52. }
  53. }
  54. /* 53.75rem it is width of screenshot image + toolbar width(15rem) + 2rem of margins. */
  55. @media screen and (max-width: 53.75rem) {
  56. .toolbar-tray-open.toolbar-vertical.toolbar-fixed .card-list--four-cols .card-list__item {
  57. flex-basis: 100%;
  58. max-width: 100%;
  59. margin-right: 0;
  60. margin-left: 0;
  61. }
  62. }
  63. @media screen and (min-width: 70rem) {
  64. .card-list--four-cols .card-list__item {
  65. flex-basis: calc(33.3% - 0.66667rem);
  66. max-width: calc(33.3% - 0.66667rem);
  67. }
  68. .card-list--four-cols .card-list__item:nth-child(even) {
  69. margin-right: 1rem;
  70. }
  71. [dir="rtl"] .card-list--four-cols .card-list__item:nth-child(even) {
  72. margin-right: 0;
  73. margin-left: 1rem;
  74. }
  75. .card-list--four-cols .card-list__item:nth-child(3n) {
  76. margin-right: 0;
  77. }
  78. [dir="rtl"] .card-list--four-cols .card-list__item:nth-child(3n) {
  79. margin-right: 0;
  80. margin-left: 0;
  81. }
  82. }
  83. @media screen and (min-width: 85.375rem) {
  84. .card-list--two-cols .card-list__item {
  85. flex-basis: calc(49.95% - 0.5rem);
  86. max-width: calc(49.95% - 0.5rem);
  87. margin-right: 1rem;
  88. }
  89. [dir="rtl"] .card-list--two-cols .card-list__item {
  90. margin-right: 0;
  91. margin-left: 1rem;
  92. }
  93. .card-list--two-cols .card-list__item:nth-child(even) {
  94. margin-right: 0;
  95. }
  96. [dir="rtl"] .card-list--two-cols .card-list__item:nth-child(even) {
  97. margin-right: 0;
  98. margin-left: 0;
  99. }
  100. .card-list--four-cols .card-list__item {
  101. flex-basis: calc(24.975% - 0.75rem);
  102. max-width: calc(24.975% - 0.75rem);
  103. }
  104. .card-list--four-cols .card-list__item:nth-child(even) {
  105. margin-right: 1rem;
  106. }
  107. [dir="rtl"] .card-list--four-cols .card-list__item:nth-child(even) {
  108. margin-right: 0;
  109. margin-left: 1rem;
  110. }
  111. .card-list--four-cols .card-list__item:nth-child(3n) {
  112. margin-right: 1rem;
  113. }
  114. [dir="rtl"] .card-list--four-cols .card-list__item:nth-child(3n) {
  115. margin-right: 0;
  116. margin-left: 1rem;
  117. }
  118. .card-list--four-cols .card-list__item:nth-child(4n) {
  119. margin-right: 0;
  120. }
  121. [dir="rtl"] .card-list--four-cols .card-list__item:nth-child(4n) {
  122. margin-right: 0;
  123. margin-left: 0;
  124. }
  125. }

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