Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Add flex-grow rule to overlapping columns block style. #372

Merged
merged 3 commits into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions assets/css/ie.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/ie.css.map

Large diffs are not rendered by default.

58 changes: 31 additions & 27 deletions assets/sass/05-blocks/columns/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,40 @@

@include media(laptop) {

.wp-block-column:nth-child(2n) {
margin-left: calc(-2 * var(--global--spacing-horizontal));
margin-top: calc(2.5 * var(--global--spacing-horizontal));

// Provide text-based child blocks with a default background color to ensure they're readable.
> p,
> h1,
> h2,
> h3,
> h4,
> h5,
> h6,
> ul,
> ol,
> pre {

&:not(.has-background) {
background-color: var(--global--color-background);
padding: var(--global--spacing-unit);
.wp-block-column {
flex-grow: 1;

&:nth-child(2n) {
margin-left: calc(-2 * var(--global--spacing-horizontal));
margin-top: calc(2.5 * var(--global--spacing-horizontal));

// Provide text-based child blocks with a default background color to ensure they're readable.
> p,
> h1,
> h2,
> h3,
> h4,
> h5,
> h6,
> ul,
> ol,
> pre {

&:not(.has-background) {
background-color: var(--global--color-background);
padding: var(--global--spacing-unit);
}
}
}

// Lists should still have their usual left padding.
> ul:not(.has-background),
> ol:not(.has-background) {
padding-left: calc(2 * var(--global--spacing-horizontal));
}
// Lists should still have their usual left padding.
> ul:not(.has-background),
> ol:not(.has-background) {
padding-left: calc(2 * var(--global--spacing-horizontal));
}

&.is-vertically-aligned-center {
margin-top: 0;
&.is-vertically-aligned-center {
margin-top: 0;
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions style-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion style.css.map

Large diffs are not rendered by default.