Skip to content

Commit

Permalink
Polish color inheritnce.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Mar 23, 2021
1 parent d286560 commit f9e1615
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
1 change: 1 addition & 0 deletions packages/block-library/src/navigation/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ $color-control-label-height: 20px;
.components-button.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close {
padding: 0;
height: auto;
color: inherit;
}

// Make the menu inert in the editor.
Expand Down
39 changes: 17 additions & 22 deletions packages/block-library/src/navigation/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,33 @@
align-items: flex-start;
justify-content: flex-start;

// Provide an opinionated default style for menu items inside.
// Inherit as much as we can regarding colors, fonts, sizes,
// but otherwise provide a baseline.
// In a future version, we can explore more customizability.
&.is-menu-open {
display: flex;
flex-direction: column;

// Give it a z-index just higher than the adminbar.
z-index: 100000;

padding: 24px;
background-color: inherit;

.wp-block-navigation__container {
display: flex;
flex-direction: column;
max-width: 400px;
margin-left: auto;
margin-right: auto;
align-items: flex-start;
line-height: 48px;
padding: 48px 0;

.wp-block-page-list {
flex-direction: column;
}
}
}

Expand Down Expand Up @@ -154,25 +171,3 @@
width: 100%;
height: 100%;
}

// Provide an opinionated default style for menu items inside.
// Inherit as much as we can regarding colors, fonts, sizes,
// but otherwise provide a baseline.
// In a future version, we can explore more customizability.
.is-menu-open .wp-block-navigation__responsive-container-content {
padding: 24px;
background-color: inherit;

.wp-block-navigation__container {
max-width: 400px;
margin-left: auto;
margin-right: auto;
align-items: flex-start;
line-height: 48px;
padding: 48px 0;

.wp-block-page-list {
flex-direction: column;
}
}
}

0 comments on commit f9e1615

Please sign in to comment.