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

Fix Core Columns butting up against viewport on smaller screens #20589

Closed
wants to merge 2 commits into from
Closed
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: 13 additions & 0 deletions packages/block-library/src/columns/editor.scss
Original file line number Diff line number Diff line change
@@ -175,3 +175,16 @@ div.block-core-columns.is-vertically-aligned-bottom {
padding-right: $block-container-side-padding;
}
}

// Stop Columns butting up against edge of viewport on smaller viewports. Remove
// on larger viewports where width handles this. Specificity overide required to
// overide generic `.entry-content *` rule
Comment on lines +180 to +181
Copy link
Contributor

Choose a reason for hiding this comment

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

overide should be override

.wp-block-columns > .block-editor-inner-blocks > .block-editor-block-list__layout {
padding-left: $block-padding;
padding-right: $block-padding;

@include break-small() {
padding-left: 0;
padding-right: 0;
}
}
15 changes: 15 additions & 0 deletions packages/block-library/src/columns/style.scss
Original file line number Diff line number Diff line change
@@ -14,6 +14,21 @@
}
}

// Stop Columns butting up against edge of viewport on smaller viewports. Remove
// on larger viewports where width handles this. Specificity overide required to
// overide generic `.entry-content *` rule
Comment on lines +18 to +19
Copy link
Contributor

Choose a reason for hiding this comment

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

overide should be override

.wp-block-columns {
&.wp-block-columns:not(.has-background) {
padding-left: $block-padding;
padding-right: $block-padding;

@include break-xlarge() {
padding-left: 0;
padding-right: 0;
}
Comment on lines +25 to +28
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like if it's an align-full block, that this padding applies, making it butt up against the window on the front-end:
Screen Shot 2020-03-02 at 4 02 18 PM

}
}

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