layout-builder-fourcol-section.pcss.css
Same filename in other branches
/* * @file * Provides the layout styles for four-column layout section. */ @import "../base/media-queries.pcss.css"; .layout--fourcol-section { display: flex; flex-wrap: wrap; & > .layout__region { flex: 1 0 100%; margin-block-end: var(--grid-gap); @media (--md) { flex-basis: calc(50% - (var(--grid-gap) * 0.5)); flex-grow: 0; flex-shrink: 0; margin-block-end: 0; } } /* Two column layout. */ @media (--md) { & > .layout__region--first, & > .layout__region--second { margin-block-end: var(--grid-gap); } & > .layout__region--first, & > .layout__region--third { margin-inline-end: calc(var(--grid-gap) * 0.5); } & > .layout__region--second, & > .layout__region--fourth { margin-inline-start: calc(var(--grid-gap) * 0.5); } } /* Four column layout. */ @media (--lg) { & > .layout__region { flex-basis: calc(25% - (var(--grid-gap) * 0.75)); } & > .layout__region--first, & > .layout__region--second { margin-block-end: 0; } & > .layout__region--first { margin-inline-end: calc(var(--grid-gap) * 0.5); } & > .layout__region--second, & > .layout__region--third { margin-inline: calc(var(--grid-gap) * 0.5); } & > .layout__region--fourth { margin-inline-start: calc(var(--grid-gap) * 0.5); } } }
File
-
core/
themes/ olivero/ css/ layout/ layout-builder-fourcol-section.pcss.css
View source
- /*
- * @file
- * Provides the layout styles for four-column layout section.
- */
-
- @import "../base/media-queries.pcss.css";
-
- .layout--fourcol-section {
- display: flex;
- flex-wrap: wrap;
-
- & > .layout__region {
- flex: 1 0 100%;
- margin-block-end: var(--grid-gap);
-
- @media (--md) {
- flex-basis: calc(50% - (var(--grid-gap) * 0.5));
- flex-grow: 0;
- flex-shrink: 0;
- margin-block-end: 0;
- }
- }
-
- /* Two column layout. */
- @media (--md) {
- & > .layout__region--first,
- & > .layout__region--second {
- margin-block-end: var(--grid-gap);
- }
-
- & > .layout__region--first,
- & > .layout__region--third {
- margin-inline-end: calc(var(--grid-gap) * 0.5);
- }
-
- & > .layout__region--second,
- & > .layout__region--fourth {
- margin-inline-start: calc(var(--grid-gap) * 0.5);
- }
- }
-
- /* Four column layout. */
- @media (--lg) {
- & > .layout__region {
- flex-basis: calc(25% - (var(--grid-gap) * 0.75));
- }
-
- & > .layout__region--first,
- & > .layout__region--second {
- margin-block-end: 0;
- }
-
- & > .layout__region--first {
- margin-inline-end: calc(var(--grid-gap) * 0.5);
- }
-
- & > .layout__region--second,
- & > .layout__region--third {
- margin-inline: calc(var(--grid-gap) * 0.5);
- }
-
- & > .layout__region--fourth {
- margin-inline-start: calc(var(--grid-gap) * 0.5);
- }
- }
- }
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.