diff --git a/core-blocks/columns/editor.scss b/core-blocks/columns/editor.scss index d68749cccf9d21..87695cab379dc8 100644 --- a/core-blocks/columns/editor.scss +++ b/core-blocks/columns/editor.scss @@ -37,3 +37,18 @@ margin-right: $block-side-ui-padding; } } + +.wp-block-columns { + display: block; + + .editor-inner-blocks { + display: grid; + grid-auto-flow: dense; + } + + @for $i from 2 through 6 { + &.has-#{ $i }-columns .editor-inner-blocks { + grid-auto-columns: #{ 100% / $i }; + } + } +} diff --git a/core-blocks/columns/style.scss b/core-blocks/columns/style.scss index 32b99fd0bc6583..9ec2e09c5c8753 100644 --- a/core-blocks/columns/style.scss +++ b/core-blocks/columns/style.scss @@ -1,12 +1,9 @@ .wp-block-columns { - - .editor-inner-blocks { - display: grid; - grid-auto-flow: dense; - } + display: grid; + grid-auto-flow: dense; @for $i from 2 through 6 { - &.has-#{ $i }-columns .editor-inner-blocks { + &.has-#{ $i }-columns { grid-auto-columns: #{ 100% / $i }; } }