wide-content.css

Same filename and directory in other branches
  1. 10 core/themes/olivero/css/components/wide-content.css
  2. 11.x core/themes/olivero/css/components/wide-content.css

Wide content

This component breaks out of the layout-content-narrow grid layout using a combination of carefully calculated negative margins and widths. It is used on the article's default image field.

File

core/themes/olivero/css/components/wide-content.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. * Wide content
  10. *
  11. * This component breaks out of the layout-content-narrow grid layout using a
  12. * combination of carefully calculated negative margins and widths. It is used
  13. * on the article's default image field.
  14. */
  15. .wide-content {
  16. margin-block-start: var(--sp0-5);
  17. margin-block-end: var(--sp2);
  18. margin-inline-start: 0;
  19. margin-inline-end: 0;
  20. @media (min-width: 43.75rem) {
  21. width: calc(var(--grid-col-count) * var(--grid-col-width) + var(--grid-gap-count) * var(--grid-gap));
  22. margin-block: var(--sp2) var(--sp4);
  23. margin-inline-start: calc(-1 * ((var(--grid-col-width) + var(--grid-gap))));
  24. }
  25. @media (min-width: 62.5rem) {
  26. width: calc(12 * var(--grid-col-width) + 11 * var(--grid-gap));
  27. margin-inline-start: calc(-1 * (var(--grid-col-width) + var(--grid-gap)));
  28. }
  29. }
  30. /* Ensure that image doesn't overlap sidebar. */
  31. .sidebar-grid .wide-content {
  32. @media (min-width: 62.5rem) {
  33. width: calc(9 * var(--grid-col-width) + 8 * var(--grid-gap));
  34. }
  35. @media (min-width: 81.25rem) {
  36. width: calc(10 * var(--grid-col-width) + 9 * var(--grid-gap));
  37. }
  38. }
  39. /* Ensure that image doesn't overlap layout builder sections when editing layouts. */
  40. .layout-builder .wide-content,
  41. .region--hero .wide-content {
  42. max-width: 100%;
  43. margin-inline: 0;
  44. }

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