teaser.css

Same filename and directory in other branches
  1. 10 core/themes/olivero/components/teaser/teaser.css
/*
 * DO NOT EDIT THIS FILE.
 * See the following change record for more information,
 * https://www.drupal.org/node/3084859
 * @preserve
 */
.teaser {
  position: relative; /* Anchor after pseudo-element. */
  padding-block-end: var(--sp1-5);

  &::after {
    position: absolute;
    inset-block-end: 0;
    width: var(--sp3);
    height: 0;
    content: "";
    /* Intentionally not using CSS logical properties. */
    border-top: solid 2px var(--color--gray-95);
  }

  @media (min-width: 62.5rem) {
    padding-block-end: var(--sp3);
  }
}
.teaser__content {
  display: grid;
  grid-auto-rows: max-content;
  gap: var(--sp);

  .field:not(:last-child) {
    margin-block-end: 0;
  }

  @media (min-width: 62.5rem) {
    gap: var(--sp2);
  }
}
.teaser__image {
  flex-shrink: 0;
  margin: 0;

  &:empty {
    display: none;

    & + .teaser__title {
      flex-basis: auto;
    }
  }

  & a {
    display: block;
  }

  & img {
    width: var(--sp3-5);
    height: var(--sp3-5);
    object-fit: cover;
    border-radius: 50%;

    @media (min-width: 62.5rem) {
      width: var(--grid-col-width);
      height: var(--grid-col-width);
    }
  }

  @media (min-width: 62.5rem) {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: calc(-1 * ((var(--grid-col-width) + var(--grid-gap))));
    margin: 0;
  }
}
.teaser__meta {
  margin-block-end: var(--sp);
}
.teaser__title {
  margin-block: 0;
  flex-basis: calc(100% - var(--sp4-5));
  color: var(--color-text-neutral-loud);
  font-size: 1.5rem;
  line-height: var(--line-height-base);

  @media (min-width: 62.5rem) {
    flex-basis: auto;
    font-size: var(--sp2);
    line-height: var(--sp3);
  }
}
.teaser__top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  margin: 0;
  gap: var(--sp1);
  margin-block-end: var(--sp1);

  @media (min-width: 62.5rem) {
    position: relative; /* Anchor the image */
  }
}

File

core/themes/olivero/components/teaser/teaser.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. .teaser {
  8. position: relative; /* Anchor after pseudo-element. */
  9. padding-block-end: var(--sp1-5);
  10. &::after {
  11. position: absolute;
  12. inset-block-end: 0;
  13. width: var(--sp3);
  14. height: 0;
  15. content: "";
  16. /* Intentionally not using CSS logical properties. */
  17. border-top: solid 2px var(--color--gray-95);
  18. }
  19. @media (min-width: 62.5rem) {
  20. padding-block-end: var(--sp3);
  21. }
  22. }
  23. .teaser__content {
  24. display: grid;
  25. grid-auto-rows: max-content;
  26. gap: var(--sp);
  27. .field:not(:last-child) {
  28. margin-block-end: 0;
  29. }
  30. @media (min-width: 62.5rem) {
  31. gap: var(--sp2);
  32. }
  33. }
  34. .teaser__image {
  35. flex-shrink: 0;
  36. margin: 0;
  37. &:empty {
  38. display: none;
  39. & + .teaser__title {
  40. flex-basis: auto;
  41. }
  42. }
  43. & a {
  44. display: block;
  45. }
  46. & img {
  47. width: var(--sp3-5);
  48. height: var(--sp3-5);
  49. object-fit: cover;
  50. border-radius: 50%;
  51. @media (min-width: 62.5rem) {
  52. width: var(--grid-col-width);
  53. height: var(--grid-col-width);
  54. }
  55. }
  56. @media (min-width: 62.5rem) {
  57. position: absolute;
  58. inset-block-start: 0;
  59. inset-inline-start: calc(-1 * ((var(--grid-col-width) + var(--grid-gap))));
  60. margin: 0;
  61. }
  62. }
  63. .teaser__meta {
  64. margin-block-end: var(--sp);
  65. }
  66. .teaser__title {
  67. margin-block: 0;
  68. flex-basis: calc(100% - var(--sp4-5));
  69. color: var(--color-text-neutral-loud);
  70. font-size: 1.5rem;
  71. line-height: var(--line-height-base);
  72. @media (min-width: 62.5rem) {
  73. flex-basis: auto;
  74. font-size: var(--sp2);
  75. line-height: var(--sp3);
  76. }
  77. }
  78. .teaser__top {
  79. display: flex;
  80. flex-wrap: nowrap;
  81. align-items: center;
  82. margin: 0;
  83. gap: var(--sp1);
  84. margin-block-end: var(--sp1);
  85. @media (min-width: 62.5rem) {
  86. position: relative; /* Anchor the image */
  87. }
  88. }

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