Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation: Fix page list issues in overlay #37444

Merged
merged 2 commits into from
Dec 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions packages/block-library/src/navigation/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ button.wp-block-navigation-item__content {
// as a column.
display: flex;
flex-direction: column;
flex-wrap: nowrap;

// Inherit alignment settings from container.
align-items: var(--layout-justification-setting, inherit);

Expand Down Expand Up @@ -460,20 +462,19 @@ button.wp-block-navigation-item__content {
// Position and style.
position: static;
border: none;
padding-left: 32px;
padding-right: 32px;
padding-left: 2em;
padding-right: 2em;
Copy link
Contributor

@kjellr kjellr Dec 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to use em-based values for the nav padding in general? It gets a little extra-spacious if you specify a larger text size:

Screen Shot 2021-12-16 at 9 13 25 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that change looks a bit slipstreamed in. When I made that change, I actually made it to match up with the change made in #37323. But I'm happy to revisit both of these? What would be ideal in your mind?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be handled separately. Ideally there's some other measurement we can harness for the default (maybe blockGap?). Or else, switching to rem would be a little more stable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll follow up with rems

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Followup: #37478

}

// Space unfolded items using gap and padding for submenus.
.wp-block-navigation__submenu-container,
.wp-block-navigation__container {
gap: var(--wp--style--block-gap, 2em);
}

// Apply top padding to nested submenus.
.wp-block-navigation__submenu-container,
.wp-block-navigation__container {
padding-top: var(--wp--style--block-gap, 2em);
}
// Apply top padding to nested submenus.
.wp-block-navigation__submenu-container {
padding-top: var(--wp--style--block-gap, 2em);
}

// A default padding is added to submenu items. It's not appropriate inside the modal.
Expand Down Expand Up @@ -581,14 +582,12 @@ button.wp-block-navigation-item__content {
// The menu adds wrapping containers.
.wp-block-navigation__responsive-close {
width: 100%;
height: 100%;
}

.is-menu-open .wp-block-navigation__responsive-close,
.is-menu-open .wp-block-navigation__responsive-dialog,
.is-menu-open .wp-block-navigation__responsive-container-content {
box-sizing: border-box;
height: 100%;
}

.wp-block-navigation__responsive-dialog {
Expand Down