Skip to content

Commit

Permalink
Fix issue with margi on blocks with no toolbars
Browse files Browse the repository at this point in the history
This fixes an issue with the current embed block placeholder, which has an empty toolbar. With the recent merge of the position sticky toolbars, we're using some negative margins, which when the toolbar isn't present, caused some bleed issues.
  • Loading branch information
jasmussen committed May 10, 2017
1 parent 490fdad commit 8040a0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions editor/assets/stylesheets/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ $text-editor-max-width: 760px;
/* Editor */
$text-editor-max-width: 760px;
$visual-editor-max-width: 700px;
$block-controls-height: 46px;

/* Blocks */
$block-padding: 14px;
Expand Down
3 changes: 2 additions & 1 deletion editor/modes/visual-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@
display: flex;
position: sticky;
z-index: 1;
margin-top: -46px - $item-spacing; // 46 is toolbar height
margin-top: -$block-controls-height - $item-spacing;
margin-bottom: $item-spacing + 20px; // 20px is the offset from the bottom of the selected block where it stops sticking
height: $block-controls-height;

top: $header-height + $admin-bar-height-big + $item-spacing;

Expand Down

0 comments on commit 8040a0f

Please sign in to comment.