Skip to content

Commit

Permalink
Merge pull request #753 from WordPress/fix/sticky-issues
Browse files Browse the repository at this point in the history
Fix issue with margin on blocks with no toolbars
  • Loading branch information
jasmussen committed May 10, 2017
2 parents 490fdad + 8040a0f commit b21ce3d
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 b21ce3d

Please sign in to comment.