1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /**
- * @file
- * Grid system.
- */
- @import "../base/variables.pcss.css";
- .grid-full {
- display: grid;
- grid-template-rows: 1fr;
- grid-template-columns: repeat(var(--grid-col-count), minmax(0, 1fr));
- grid-column-gap: var(--grid-gap);
- /* .grid-full classes nested 3 or more deep go full width. */
- & .grid-full .grid-full {
- display: block;
- }
- @media (--grid-md) {
- grid-template-columns: repeat(var(--grid-col-count--md), minmax(0, 1fr));
- grid-column-gap: var(--grid-gap--md);
- }
- }
- /*
- If the .grid-full is nested within the following, apply the appropriate number of columns.
- - .layout--content-narrow class.
- - Element that's inheriting the layout--content-narrow styles from its parent region.
- */
- .layout--content-narrow .grid-full,
- .layout--pass--content-narrow > * .grid-full {
- @media (--grid-md) {
- -ms-grid-columns: (minmax(0, 1fr))[ calc(var(--grid-col-count--md) - 2) ];
- grid-template-columns: repeat(calc(var(--grid-col-count--md) - 2), minmax(0, 1fr));
- }
- @media (--lg) {
- -ms-grid-columns: (minmax(0, 1fr))[ calc(var(--grid-col-count--lg) - 6) ];
- grid-template-columns: repeat(calc(var(--grid-col-count--lg) - 6), minmax(0, 1fr));
- }
- }
- /*
- If the .grid-full is nested within the following, apply the appropriate number of columns.
- - .layout--content-medium class.
- - Element that's inheriting the layout--content-medium styles from its parent region.
- */
- .layout--content-medium .grid-full,
- .layout--pass--content-medium > * .grid-full {
- @media (--grid-md) {
- -ms-grid-columns: (minmax(0, 1fr))[ calc(var(--grid-col-count--md) - 2) ];
- grid-template-columns: repeat(calc(var(--grid-col-count--md) - 2), minmax(0, 1fr));
- }
- @media (--lg) {
- -ms-grid-columns: (minmax(0, 1fr))[ calc(var(--grid-col-count--md) - 4) ];
- grid-template-columns: repeat(calc(var(--grid-col-count--md) - 4), minmax(0, 1fr));
- }
- }
|