Skip to content

Commit

Permalink
Only show the plus for the selected layer.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Nov 18, 2021
1 parent 9890d80 commit 5794f73
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@
// treating them the same, one or both can be retired.
.block-editor-inserter__toggle.components-button.has-icon,
.block-list-appender__toggle {
display: flex;
flex-direction: row;
box-shadow: none;
height: $button-size-small;
width: $button-size-small;

// Hide by default, then we unhide it when the selected block is a direct ancestor.
display: none;

// Important to override styles form Button component.
padding: 0 !important;

Expand Down Expand Up @@ -116,3 +118,10 @@
}
}

// Unhide the inserter when you're in the exact container.
.block-editor-block-list__block.is-selected > .block-list-appender {
.block-editor-inserter__toggle.components-button.has-icon,
.block-list-appender__toggle {
display: flex;
}
}

0 comments on commit 5794f73

Please sign in to comment.