From abb14b109141964e3768a7667a29252f5a47b9a7 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Wed, 1 Aug 2018 11:02:43 +0200 Subject: [PATCH] Try uncollapsing margins on the columns block. (#8283) * Try uncollapsing margins on the columns block. This is a first stab at fixing #7766. It does not address it fully, I believe further work is necessary, including that of #7694. However this should at least improve the collapsing of the parent container. * Move to .1px. --- core-blocks/columns/editor.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core-blocks/columns/editor.scss b/core-blocks/columns/editor.scss index c05d4ffc3ad176..4633c8a23d1446 100644 --- a/core-blocks/columns/editor.scss +++ b/core-blocks/columns/editor.scss @@ -32,12 +32,17 @@ } } -// Flex container margins do not collapse: https://www.w3.org/TR/css-flexbox-1/#flex-containers. +// This block has flex container children. Flex container margins do not collapse: https://www.w3.org/TR/css-flexbox-1/#flex-containers. // Therefore, let's at least not add any additional margins here. +// The goal is for the editor to look more like the front-end. .editor-block-list__layout .editor-block-list__block[data-type="core/columns"] > .editor-block-list__block-edit, .editor-block-list__layout .editor-block-list__block[data-type="core/column"] > .editor-block-list__block-edit { margin-top: 0; margin-bottom: 0; + + // This uncollapses margins on this parent container. + padding-top: 0.1px; + padding-bottom: 0.1px; } .wp-block-columns {