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 block: fix padding on mobile overlay when global padding is 0 #53725

Merged
merged 4 commits into from
Sep 26, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Allow the padding to be smaller than 2rem
  • Loading branch information
scruffian authored and getdave committed Sep 26, 2023
commit 6f92e28e3bf4b180e034f590c13735f6811a69ff
8 changes: 4 additions & 4 deletions packages/block-library/src/navigation/style.scss
Original file line number Diff line number Diff line change
@@ -506,10 +506,10 @@ button.wp-block-navigation-item__content {
@include reduce-motion("animation");

// Try to inherit any root paddings set, so the X can align to a top-right aligned menu.
padding-top: max(var(--wp--style--root--padding-top, 2rem), 2rem);
padding-right: max(var(--wp--style--root--padding-right, 2rem), 2rem);
padding-bottom: max(var(--wp--style--root--padding-bottom, 2rem), 2rem);
padding-left: max(var(--wp--style--root--padding-left, 2rem), 2rem);
padding-top: clamp(1rem, var(--wp--style--root--padding-top), 20rem);
padding-right: clamp(1rem, var(--wp--style--root--padding-right), 20rem);
padding-bottom: clamp(1rem, var(--wp--style--root--padding-bottom), 20rem);
padding-left: clamp(1rem, var(--wp--style--root--padding-left), 20em);

// Allow modal to scroll.
overflow: auto;