Skip to content

Commit

Permalink
Try uncollapsing margins on the columns block.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Joen Asmussen committed Jul 30, 2018
1 parent 72384a6 commit cfce97a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core-blocks/columns/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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: 1px;
padding-bottom: 1px;
}

.wp-block-columns {
Expand Down

0 comments on commit cfce97a

Please sign in to comment.