layout-builder-threecol-section.pcss.css

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

@import "../base/variables.pcss.css";

.layout--threecol-section {
  display: flex;
  flex-wrap: wrap;

  & > .layout__region {
    flex: 1 0 100%;
    margin-block-end: var(--grid-gap);

    @media (--lg) {
      flex-grow: 0;
      flex-shrink: 0;
      margin-block-end: 0;
    }
  }
}

@media (--lg) {
  .layout--threecol-section {
    & > .layout__region--first {
      margin-inline-end: calc(var(--grid-gap--md) * 0.5);
    }

    & > .layout__region--second {
      margin-inline: calc(var(--grid-gap--md) * 0.5);
    }

    & > .layout__region--third {
      margin-inline-start: calc(var(--grid-gap--md) * 0.5);
    }
  }

  .layout--threecol-section--25-50-25 {
    & > .layout__region--first,
    & > .layout__region--third {
      flex-basis: calc(25% - (var(--grid-gap--md) * 0.5));
    }

    & > .layout__region--second {
      flex-basis: calc(50% - var(--grid-gap--md));
    }
  }

  .layout--threecol-section--25-25-50 {
    & > .layout__region--first,
    & > .layout__region--second {
      flex-basis: calc(25% - (var(--grid-gap--md) * 0.5));
    }

    & > .layout__region--third {
      flex-basis: calc(50% - var(--grid-gap--md));
    }
  }

  .layout--threecol-section--50-25-25 {
    & > .layout__region--first {
      flex-basis: calc(50% - var(--grid-gap--md));
    }

    & > .layout__region--second,
    & > .layout__region--third {
      flex-basis: calc(25% - (var(--grid-gap--md) * 0.5));
    }
  }

  .layout--threecol-section--33-34-33 {
    & > .layout__region--first,
    & > .layout__region--second,
    & > .layout__region--third {
      flex-basis: calc(33.33% - (var(--grid-gap--md) * 0.667));
    }
  }
}

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/variables.pcss.css";
  6. .layout--threecol-section {
  7. display: flex;
  8. flex-wrap: wrap;
  9. & > .layout__region {
  10. flex: 1 0 100%;
  11. margin-block-end: var(--grid-gap);
  12. @media (--lg) {
  13. flex-grow: 0;
  14. flex-shrink: 0;
  15. margin-block-end: 0;
  16. }
  17. }
  18. }
  19. @media (--lg) {
  20. .layout--threecol-section {
  21. & > .layout__region--first {
  22. margin-inline-end: calc(var(--grid-gap--md) * 0.5);
  23. }
  24. & > .layout__region--second {
  25. margin-inline: calc(var(--grid-gap--md) * 0.5);
  26. }
  27. & > .layout__region--third {
  28. margin-inline-start: calc(var(--grid-gap--md) * 0.5);
  29. }
  30. }
  31. .layout--threecol-section--25-50-25 {
  32. & > .layout__region--first,
  33. & > .layout__region--third {
  34. flex-basis: calc(25% - (var(--grid-gap--md) * 0.5));
  35. }
  36. & > .layout__region--second {
  37. flex-basis: calc(50% - var(--grid-gap--md));
  38. }
  39. }
  40. .layout--threecol-section--25-25-50 {
  41. & > .layout__region--first,
  42. & > .layout__region--second {
  43. flex-basis: calc(25% - (var(--grid-gap--md) * 0.5));
  44. }
  45. & > .layout__region--third {
  46. flex-basis: calc(50% - var(--grid-gap--md));
  47. }
  48. }
  49. .layout--threecol-section--50-25-25 {
  50. & > .layout__region--first {
  51. flex-basis: calc(50% - var(--grid-gap--md));
  52. }
  53. & > .layout__region--second,
  54. & > .layout__region--third {
  55. flex-basis: calc(25% - (var(--grid-gap--md) * 0.5));
  56. }
  57. }
  58. .layout--threecol-section--33-34-33 {
  59. & > .layout__region--first,
  60. & > .layout__region--second,
  61. & > .layout__region--third {
  62. flex-basis: calc(33.33% - (var(--grid-gap--md) * 0.667));
  63. }
  64. }
  65. }

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