Skip to content

Commit

Permalink
Adjust Navigation block submenu padding and spacing. (#23380)
Browse files Browse the repository at this point in the history
* Adjust submenu padding and spacing.

* px nudge

* Fix appender position.
  • Loading branch information
tellthemachines authored Jun 24, 2020
1 parent 9e34f38 commit e9e91c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 4 additions & 7 deletions packages/block-library/src/navigation/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ $navigation-item-height: 46px;
visibility: visible;
}
}

// Adjust the appender margin to match other menu items
.wp-block-navigation__container {
.block-list-appender .block-editor-button-block-appender {
margin-left: $grid-unit-10 * 2;
}
}
}

/**
Expand Down Expand Up @@ -161,3 +154,7 @@ $color-control-label-height: 20px;
background-color: #fff;
}
}

.wp-block-navigation .block-editor-button-block-appender {
justify-content: flex-start;
}
11 changes: 6 additions & 5 deletions packages/block-library/src/navigation/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
align-items: center;
position: relative;
margin: 0;
padding: $grid-unit-10;

.wp-block-navigation__container:empty {
display: none;
Expand All @@ -32,7 +31,6 @@
$navigation-vertical-padding: $grid-unit-10 * 0.75;
.wp-block-navigation__container {
border: $border-width solid rgba(0, 0, 0, 0.15);
padding: $navigation-vertical-padding 0;
background-color: inherit;
color: inherit;
position: absolute;
Expand Down Expand Up @@ -60,8 +58,8 @@

// Nested submenus sit to the left on large breakpoints
.wp-block-navigation__container {
left: calc(100% + #{$grid-unit-10});
top: -$border-width - $navigation-vertical-padding;
left: 100%;
top: -1px;

// Prevent the menu from disappearing when the mouse is over the gap
&::before {
Expand Down Expand Up @@ -108,8 +106,11 @@
// All links
.wp-block-navigation-link__content {
text-decoration: none;
padding: $grid-unit-10 * 0.75 $grid-unit-10 * 2;
padding: $grid-unit-10 $grid-unit-10 * 2;

+ .wp-block-navigation-link__content {
padding-top: 0;
}
.has-text-color & {
color: inherit;
}
Expand Down

0 comments on commit e9e91c3

Please sign in to comment.