From 1d6548a3ec5da248a67ed92b6122bce2e7f2d00e Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 10 Oct 2019 11:07:44 +0200 Subject: [PATCH] Fix columns to work with the new margins. --- packages/block-library/src/columns/editor.scss | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/block-library/src/columns/editor.scss b/packages/block-library/src/columns/editor.scss index 60c6730fc2b088..31189ccf39bef6 100644 --- a/packages/block-library/src/columns/editor.scss +++ b/packages/block-library/src/columns/editor.scss @@ -3,9 +3,6 @@ // Potentially the rules here can apply to all nested blocks and enable stacking, in which case it should be moved elsewhere // When using CSS grid, margins do not collapse on the container. .wp-block-columns .editor-block-list__layout { - margin-left: 0; - margin-right: 0; - // This max-width is used to constrain the main editor column, it should not cascade into columns .editor-block-list__block { max-width: none; @@ -62,10 +59,10 @@ // Beyond mobile, allow 2 columns. @include break-small() { - flex-basis: calc(50% - (#{$grid-size-large} + #{$block-padding * 2})); + flex-basis: calc(50% - (#{$grid-size-large})); flex-grow: 0; - margin-left: $block-padding; - margin-right: $block-padding; + margin-left: 0; + margin-right: 0; } // Add space between columns. Themes can customize this if they wish to work differently. @@ -73,14 +70,14 @@ // Only apply this beyond the mobile breakpoint, as there's only a single column on mobile. @include break-small() { &:nth-child(even) { - margin-left: calc(#{$grid-size-large * 2} + #{$block-padding}); + margin-left: calc(#{$grid-size-large * 2}); } } // When columns are in a single row, add space before all except the first. @include break-medium() { &:not(:first-child) { - margin-left: calc(#{$grid-size-large * 2} + #{$block-padding}); + margin-left: calc(#{$grid-size-large * 2}); } }