Skip to content

Commit

Permalink
Try: Allow vertical inserter in the nav block.
Browse files Browse the repository at this point in the history
Fixes #28313.
  • Loading branch information
jasmussen committed Mar 12, 2021
1 parent 877f615 commit 4cd0ad1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation-link/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: flex;
align-items: center;
position: relative;
margin: 0;
margin: 0 0.5em 0 0;

.wp-block-navigation-link__container:empty {
display: none;
Expand Down
8 changes: 8 additions & 0 deletions packages/block-library/src/navigation/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@
}

// Unset horizontal and vertical margin rules from editor normalization stylesheet.
// Both margin-left: auto; and margin-right: auto; from .wp-block, and also
// margin: revert; from .editor-styles-wrapper ul li.
.block-editor-block-list__block {
margin: 0;

// This CSS provides a little spacing between blocks.
// It matches a rule in style.scss exactly, but needs higher specificity due to the unsetting of inherited styles above.
&.wp-block-navigation-link {
margin: 0 0.5em 0 0;
}
}
}

Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/navigation/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
list-style: none;

// Overrides generic ".entry-content li" styles on the front end.
margin: 0;
padding: 0;
}
}
Expand Down

0 comments on commit 4cd0ad1

Please sign in to comment.