Skip to content

Commit

Permalink
Navigation: Try inheriting orientation in setup state.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Nov 23, 2021
1 parent 894fa30 commit 6697b67
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions packages/block-library/src/navigation/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ $color-control-label-height: 20px;
background: none;
min-height: 0;

// Inherit orientation.
&,
.components-placeholder__fieldset,
.wp-block-navigation-placeholder__controls,
.wp-block-navigation-placeholder__preview,
.wp-block-navigation-placeholder__actions {
flex-direction: inherit;
}

// Needed for the preview menu items to match actual menu items.
.components-placeholder__fieldset {
font-size: inherit;
Expand Down Expand Up @@ -271,20 +280,8 @@ $color-control-label-height: 20px;
}

&:not(.is-loading) {
// Don't show the preview boxes for an empty nav block,
// but be technically present to help size the empty state.
// Don't show the preview boxes for an empty nav block.
.wp-block-navigation.is-selected & {
display: flex;
opacity: 0;
width: 0;
overflow: hidden;
flex-wrap: nowrap;
flex: 0;
}

// Hide entirely when vertical.
.wp-block-navigation.is-selected .is-small &,
.wp-block-navigation.is-selected .is-medium & {
display: none;
}
}
Expand All @@ -297,7 +294,7 @@ $color-control-label-height: 20px;
background-color: $white;
box-shadow: inset 0 0 0 $border-width $gray-900;
flex-direction: row;
align-items: center;
align-items: flex-start;
display: none;
position: relative;
z-index: 1;
Expand Down

0 comments on commit 6697b67

Please sign in to comment.