wide-content.css

Same filename in other branches
  1. 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. }
  21. @media (min-width: 43.75rem) {
  22. .wide-content {
  23. width: calc(var(--grid-col-count) * var(--grid-col-width) + var(--grid-gap-count) * var(--grid-gap));
  24. margin-block: var(--sp2) var(--sp4);
  25. margin-inline-start: calc(-1 * ((var(--grid-col-width) + var(--grid-gap))));
  26. }
  27. }
  28. @media (min-width: 62.5rem) {
  29. .wide-content {
  30. width: calc(12 * var(--grid-col-width) + 11 * var(--grid-gap));
  31. margin-inline-start: calc(-1 * (var(--grid-col-width) + var(--grid-gap)));
  32. }
  33. }
  34. /* Ensure that image doesn't overlap sidebar. */
  35. @media (min-width: 62.5rem) {
  36. .sidebar-grid .wide-content {
  37. width: calc(9 * var(--grid-col-width) + 8 * var(--grid-gap));
  38. }
  39. }
  40. @media (min-width: 81.25rem) {
  41. .sidebar-grid .wide-content {
  42. width: calc(10 * var(--grid-col-width) + 9 * var(--grid-gap));
  43. }
  44. }
  45. /* Ensure that image doesn't overlap layout builder sections when editing layouts. */
  46. .layout-builder .wide-content,
  47. .region--hero .wide-content {
  48. max-width: 100%;
  49. margin-inline: 0;
  50. }

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