layout-builder-threecol-section.pcss.css

Same filename in other branches
  1. 9 core/themes/olivero/css/layout/layout-builder-threecol-section.pcss.css
  2. 10 core/themes/olivero/css/layout/layout-builder-threecol-section.pcss.css
/*
 * @file
 * Provides the layout styles for three-column layout section.
 */

@import "../base/media-queries.pcss.css";

.layout--threecol-section {
  display: grid;
  gap: var(--grid-gap);
  grid-template-columns: var(--layout-threecol-grid);

  & > .layout__region--first {
    grid-column: var(--layout-threecol-grid__first);
  }

  & > .layout__region--second {
    grid-column: var(--layout-threecol-grid__second);
  }

  & > .layout__region--third {
    grid-column: var(--layout-threecol-grid__third);
  }
}

@media (--lg) {
  .layout--threecol-section--25-50-25 {
    --layout-threecol-grid: repeat(4, minmax(0, 1fr));
    --layout-threecol-grid__second: span 2;
  }

  .layout--threecol-section--25-25-50 {
    --layout-threecol-grid: repeat(4, minmax(0, 1fr));
    --layout-threecol-grid__third: span 2;
  }

  .layout--threecol-section--50-25-25 {
    --layout-threecol-grid: repeat(4, minmax(0, 1fr));
    --layout-threecol-grid__first: span 2;
  }

  .layout--threecol-section--33-34-33 {
    --layout-threecol-grid: repeat(3, minmax(0, 1fr));
  }
}

File

core/themes/olivero/css/layout/layout-builder-threecol-section.pcss.css

View source
  1. /*
  2. * @file
  3. * Provides the layout styles for three-column layout section.
  4. */
  5. @import "../base/media-queries.pcss.css";
  6. .layout--threecol-section {
  7. display: grid;
  8. gap: var(--grid-gap);
  9. grid-template-columns: var(--layout-threecol-grid);
  10. & > .layout__region--first {
  11. grid-column: var(--layout-threecol-grid__first);
  12. }
  13. & > .layout__region--second {
  14. grid-column: var(--layout-threecol-grid__second);
  15. }
  16. & > .layout__region--third {
  17. grid-column: var(--layout-threecol-grid__third);
  18. }
  19. }
  20. @media (--lg) {
  21. .layout--threecol-section--25-50-25 {
  22. --layout-threecol-grid: repeat(4, minmax(0, 1fr));
  23. --layout-threecol-grid__second: span 2;
  24. }
  25. .layout--threecol-section--25-25-50 {
  26. --layout-threecol-grid: repeat(4, minmax(0, 1fr));
  27. --layout-threecol-grid__third: span 2;
  28. }
  29. .layout--threecol-section--50-25-25 {
  30. --layout-threecol-grid: repeat(4, minmax(0, 1fr));
  31. --layout-threecol-grid__first: span 2;
  32. }
  33. .layout--threecol-section--33-34-33 {
  34. --layout-threecol-grid: repeat(3, minmax(0, 1fr));
  35. }
  36. }

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