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

Group, Columns: Lower specificity of padding rules further. #37356

Merged
merged 1 commit into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
13 changes: 8 additions & 5 deletions packages/block-library/src/columns/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
flex-wrap: nowrap;
}

&:where(.has-background) {
padding: $block-bg-padding--v $block-bg-padding--h;
}

/**
* All Columns Alignment
*/
Expand Down Expand Up @@ -85,8 +81,8 @@
> .wp-block-column {
// Available space should be divided equally amongst columns.
flex-basis: 0;
flex-grow: 1;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why this changed, I didn't touch this piece. May have been tweaked by a linter.


flex-grow: 1;
// Columns with an explicitly-assigned width should maintain their
// `flex-basis` width and not grow.
&[style*="flex-basis"] {
Expand All @@ -101,6 +97,13 @@
}
}

// Add low specificity default padding to columns blocks with backgrounds.
:where(.wp-block-columns.has-background) {
// Matches paragraph block padding.
padding: $block-bg-padding--v $block-bg-padding--h;
}


.wp-block-column {
flex-grow: 1;

Expand Down
9 changes: 4 additions & 5 deletions packages/block-library/src/group/theme.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.wp-block-group {
&:where(.has-background) {
// Matches paragraph Block padding
padding: $block-bg-padding--v $block-bg-padding--h;
}
// Add low specificity default padding to groups with backgrounds.
:where(.wp-block-group.has-background) {
// Matches paragraph block padding.
padding: $block-bg-padding--v $block-bg-padding--h;
}