Skip to content

Commit

Permalink
Fix sibling inserter hit area (#9229)
Browse files Browse the repository at this point in the history
This fixes #8881.

The sibling inserter hit area was not centered perfectly between two blocks. This PR fixes that.

Props to @chrisvanpatten for this fix.
  • Loading branch information
jasmussen authored Aug 23, 2018
1 parent 8ecaa36 commit e959064
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/editor/src/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@
.editor-block-list__insertion-point {
position: relative;
z-index: z-index(".editor-block-list__insertion-point");
margin-top: -$block-padding;
}

.editor-block-list__insertion-point-indicator {
Expand All @@ -729,6 +730,7 @@
background: theme(primary);
}

// This is the clickable plus.
.editor-block-list__insertion-point-inserter {
// Don't show on mobile.
display: none;
Expand All @@ -740,13 +742,8 @@
bottom: auto;
left: 0;
right: 0;
// Matches the whole empty space between two blocks
height: $block-padding * 2;
justify-content: center;

// Position above block.
top: -$block-padding;

// Show a clickable plus.
.editor-block-list__insertion-point-button {
margin-top: -4px;
Expand Down Expand Up @@ -786,6 +783,7 @@
}
}

// This is the edge-to-edge hover area that contains the plus.
.editor-block-list__block {
> .editor-block-list__insertion-point {
position: absolute;
Expand Down

0 comments on commit e959064

Please sign in to comment.