Skip to content

Commit

Permalink
Remove legacy attributes and styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Nov 10, 2021
1 parent 6592604 commit e2b0c54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
3 changes: 0 additions & 3 deletions packages/block-library/src/navigation/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ function Navigation( {
customAppender: CustomAppender = null,
} ) {
const {
itemsJustification,
openSubmenusOnClick,
overlayMenu,
showSubmenuIcon,
Expand Down Expand Up @@ -197,8 +196,6 @@ function Navigation( {
const blockProps = useBlockProps( {
ref: navRef,
className: classnames( className, {
[ `items-justified-${ attributes.itemsJustification }` ]: itemsJustification,
'is-vertical': orientation === 'vertical',
'items-justified-right': justifyContent === 'right',
'items-justified-space-between': justifyContent === 'space-between',
'is-responsive': 'never' !== overlayMenu,
Expand Down
30 changes: 1 addition & 29 deletions packages/block-library/src/navigation/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ $color-control-label-height: 20px;
}

// Hide entirely when vertical.
.is-vertical.is-selected &,
.wp-block-navigation.is-selected .is-small &,
.wp-block-navigation.is-selected .is-medium & {
display: none;
Expand Down Expand Up @@ -320,19 +319,12 @@ $color-control-label-height: 20px;

// Show stacked for the vertical navigation, or small placeholders.
.is-small &,
.is-medium &,
.is-vertical & {
.is-medium & {
.wp-block-navigation-placeholder__actions {
flex-direction: column;
}
}

// Both selected and vertical.
.is-selected.is-vertical & {
display: inline-flex; // This makes the white box not take up all available space.
padding: $grid-unit-15;
}

.wp-block-navigation-placeholder__icon {
margin-right: $grid-unit-15;
height: $button-size; // Prevents jumpiness.
Expand All @@ -353,11 +345,6 @@ $color-control-label-height: 20px;
margin-right: $grid-unit-05;
}

.is-vertical & {
margin-bottom: $grid-unit-05;
margin-left: 0;
}

// Show only in big placeholders.
display: none;
.is-large & {
Expand All @@ -366,21 +353,6 @@ $color-control-label-height: 20px;
}
}

// When block is vertical.
.is-vertical .wp-block-navigation-placeholder,
.is-vertical .wp-block-navigation-placeholder__preview,
.is-vertical .wp-block-navigation-placeholder__controls {
min-height:
$icon-size +
( $grid-unit-20 + $grid-unit-05 + $grid-unit-15 + $grid-unit-15 ) * 3;
}

.is-vertical .wp-block-navigation-placeholder__preview,
.is-vertical .wp-block-navigation-placeholder__controls {
flex-direction: column;
align-items: flex-start;
}

.wp-block-navigation-placeholder__actions {
display: flex;
font-size: $default-font-size;
Expand Down

0 comments on commit e2b0c54

Please sign in to comment.