152 lines
2.9 KiB
CSS
152 lines
2.9 KiB
CSS
.split-view {
|
|
width: 100%;
|
|
|
|
display: grid;
|
|
grid-template-columns: subgrid;
|
|
grid-column: 1/-1 !important;
|
|
|
|
.split-view__half {
|
|
flex-basis: 50%;
|
|
container-type: inline-size;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-flow: row;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
&:nth-child(1) {
|
|
grid-column: left-half;
|
|
}
|
|
|
|
&:nth-child(2) {
|
|
grid-column: right-half;
|
|
}
|
|
}
|
|
|
|
&.split-view--without-column-gap {
|
|
.split-view__half {
|
|
&:nth-child(1) {
|
|
grid-column-end: center;
|
|
}
|
|
|
|
&:nth-child(2) {
|
|
grid-column-start: center;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.split-view--bleed--bleed {
|
|
grid-column: bleed;
|
|
|
|
.split-view__half {
|
|
&:nth-child(1) {
|
|
grid-column-start: bleed-start;
|
|
}
|
|
|
|
&:nth-child(2) {
|
|
grid-column-end: bleed-end;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.split-view--bleed-left--screen {
|
|
.split-view__half {
|
|
&:nth-child(1) {
|
|
grid-column-start: screen-start;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.split-view--bleed-right--screen {
|
|
.split-view__half {
|
|
&:nth-child(2) {
|
|
grid-column-end: screen-end;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.split-view--bleed-left--bleed {
|
|
.split-view__half {
|
|
&:nth-child(1) {
|
|
grid-column-start: bleed-start;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.split-view--bleed-right--bleed {
|
|
.split-view__half {
|
|
&:nth-child(2) {
|
|
grid-column-end: bleed-end;
|
|
}
|
|
}
|
|
}
|
|
|
|
@container (max-width: 640px) {
|
|
display: grid;
|
|
grid-template-columns: subgrid;
|
|
row-gap: var(--row-gap);
|
|
|
|
&.split-view--bleed-top-mobile--none .split-view__half:nth-child(1) {
|
|
grid-column: content !important;
|
|
}
|
|
|
|
&.split-view--bleed-top-mobile--bleed .split-view__half:nth-child(1) {
|
|
grid-column: bleed !important;
|
|
}
|
|
|
|
&.split-view--bleed-top-mobile--screen .split-view__half:nth-child(1) {
|
|
grid-column: screen !important;
|
|
}
|
|
|
|
&.split-view--bleed-bottom-mobile--none .split-view__half:nth-child(2) {
|
|
grid-column: content !important;
|
|
}
|
|
|
|
&.split-view--bleed-bottom-mobile--bleed .split-view__half:nth-child(2) {
|
|
grid-column: bleed !important;
|
|
}
|
|
|
|
&.split-view--bleed-bottom-mobile--screen .split-view__half:nth-child(2) {
|
|
grid-column: screen !important;
|
|
}
|
|
|
|
&.split-view--swap-on-mobile {
|
|
.split-view__half:nth-child(1) {
|
|
grid-row: 2/3;
|
|
}
|
|
|
|
.split-view__half:nth-child(2) {
|
|
grid-row: 1/2;
|
|
}
|
|
|
|
&.split-view--bleed-top-mobile--none .split-view__half:nth-child(2) {
|
|
grid-column: content !important;
|
|
}
|
|
|
|
&.split-view--bleed-top-mobile--bleed .split-view__half:nth-child(2) {
|
|
grid-column: bleed !important;
|
|
}
|
|
|
|
&.split-view--bleed-top-mobile--screen .split-view__half:nth-child(2) {
|
|
grid-column: screen !important;
|
|
}
|
|
|
|
&.split-view--bleed-bottom-mobile--none .split-view__half:nth-child(1) {
|
|
grid-column: content !important;
|
|
}
|
|
|
|
&.split-view--bleed-bottom-mobile--bleed .split-view__half:nth-child(1) {
|
|
grid-column: bleed !important;
|
|
}
|
|
|
|
&.split-view--bleed-bottom-mobile--screen .split-view__half:nth-child(1) {
|
|
grid-column: screen !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
&.split-view--without-row-gap {
|
|
row-gap: 0;
|
|
}
|
|
}
|