Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added initial history column #115

Merged
merged 5 commits into from
Oct 9, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 76 additions & 6 deletions blocks/columns/columns.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,30 @@
margin-top: 2rem;
}

.columns.history h6 {
color: var(--transparent-grey-color-2);
font-size: var(--heading-font-size-mxs);
font-weight: var(--font-weight-medium);
margin: 0 0 1rem;
}

.columns.history strong {
font-size: var(--heading-font-size-ms);
}

.columns > div > div {
order: 1;
}

.columns.history > div {
align-items: center;
}

.columns.history picture {
display: block;
margin: 0 auto 2rem;
}

.columns p.button-container {
display: flex;
align-items: flex-start;
Expand Down Expand Up @@ -94,10 +118,6 @@
display: block;
}

.columns > div > div {
order: 1;
}

.columns > div > div h2,
.columns > div > div h3,
.columns > div > div h4 {
Expand All @@ -108,10 +128,15 @@
margin-top: 0;
}

.columns > div div.non-singleton-img {
.columns:not(.history) > div div.non-singleton-img {
margin: 0 1rem;
}

.columns.history h2 {
border-bottom: 1px solid var(--primary);
margin-bottom: 1rem;
}

.columns.crop-image > div {
align-items: stretch;
}
Expand Down Expand Up @@ -143,6 +168,10 @@
margin-left: 0;
}

.columns.history.invert-image-order-in-narrow-view > div {
flex-direction: column-reverse;
}

.columns.plain-links > div > div p:last-of-type {
margin-bottom: 0;
}
Expand Down Expand Up @@ -171,6 +200,22 @@
gap: 0;
}

/* both autoblocking options for bottom caption */
.columns.history div.image-collage.autoblocked picture ~ em,
.columns.history div.image-collage.autoblocked picture ~ p {
color: var(--transparent-grey-color-2);
font-size: var(--body-font-size-s);
margin-top: 1rem;
margin-bottom: 1rem;
text-align: center;
}

/* if the caption is on the same line then we can't text-align the em directly */
.columns.history div.image-collage.autoblocked div.non-singleton-img:last-of-type {
display: flex;
flex-direction: column;
}

@media (min-width: 62rem) {
.columns.top-down.collapse > div {
gap: 1.5rem;
Expand Down Expand Up @@ -278,6 +323,20 @@
gap: 3rem;
}

.columns.history picture {
margin: 0 auto 2rem;
}

.columns.history picture:last-child {
margin: 0 auto;
}

/* picture in column with text */
.columns.history p ~ div > div.image-collage.autoblocked picture {
display: table;
width: auto;
}

.columns > div .columns-img-col {
order: unset;
}
Expand All @@ -288,6 +347,13 @@
flex-basis: 50%;
}

.columns.history > div {
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
gap: 2rem;
}

.columns.invert-image-order-in-narrow-view > div .columns-img-col {
order: unset;
}
Expand All @@ -301,7 +367,7 @@
display: block;
}

.columns .non-singleton-img-wrapper img {
.columns.columns:not(.history) .non-singleton-img-wrapper img {
height: 3.125rem;
width: unset;
}
Expand Down Expand Up @@ -371,4 +437,8 @@
color: var(--light-black);
margin-right: 1rem;
}

main .columns.history.invert-image-order-in-narrow-view > div {
flex-direction: row;
}
}
Loading