Skip to content

Commit

Permalink
Navigation: Fix issue with space-between (#35722)
Browse files Browse the repository at this point in the history
* Navigation: Scope flex-grow to only apply for space-between

* Apply gap to navigation itself as well.
  • Loading branch information
jasmussen authored Oct 18, 2021
1 parent 3b837a0 commit 024f7ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/block-library/src/navigation/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
*/

// Menu items with no background.
.wp-block-navigation,
.wp-block-navigation .wp-block-page-list,
.wp-block-navigation__container {
gap: 0.5em 2em;
Expand All @@ -236,6 +237,7 @@
// That way if padding is set in theme.json, it still wins.
// https://css-tricks.com/almanac/selectors/w/where/
.wp-block-navigation:where(.has-background) {
&,
.wp-block-navigation .wp-block-page-list,
.wp-block-navigation__container {
gap: 0 0.5em;
Expand Down Expand Up @@ -324,7 +326,10 @@
// Horizontal layout
display: flex;
flex-wrap: wrap;
flex: 1;

.items-justified-space-between & {
flex-grow: 1;
}
}

// Vertical layout
Expand Down

0 comments on commit 024f7ea

Please sign in to comment.