Skip to content

Commit

Permalink
Fix aligned blocks toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Aug 27, 2018
1 parent 7cd977e commit 5b9271c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,13 @@
top: $block-toolbar-height + $block-padding;
}
}

// This is an important one. Because the toolbar is sticky, it's part of the flow.
// It behaves as relative, in other words, until it reaches an edge and then behaves as fixed.
// But by applying a float, we take it out of this flow. The benefit is that we don't need to compensate for margins.
// In turn, this allows margins on sibling elements to collapse to parent elements.
float: left;
width: 100%;
}

.editor-block-list__block[data-align="right"] & {
Expand Down

0 comments on commit 5b9271c

Please sign in to comment.