-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Add padding to buttons when Submenus Open on click is enabled #44605
Conversation
Size Change: +89 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, this looks good to me. I'd love a sanity check by @tellthemachines as she's worked on the button controls.
And related to that, instead of 4 rules, could we keep it at two rules by removing the a
? I.e.
:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-submenu :not(.wp-element-button))
?
I'm happy to try this. It's not a lot of code and it can be reverted if need be. Thanks again. |
What?
Adds padding to the submenu block and page list submenus when buttons are used instead of links.
-Buttons are used when the option "Submenus Open on click" is enabled.
Partial for #44591
This PR does not address the part where the page list submenus can not be opened.
Why?
The padding was only applied to links, so when the buttons were in use the spacing was incorrect.
How?
Updates the stylesheet to apply padding to the buttons in the submenu block and in the page list submenu.
Testing Instructions
Screenshots or screencast
Before:
![padding -before](https://user-images.githubusercontent.com/7422055/193217867-6ee6c2f9-fddd-4859-a24e-cd8c9f6e3efa.png)
After:
![padding -after](https://user-images.githubusercontent.com/7422055/193218312-1dbbcc6c-639c-4712-98a1-ade1f53d9a78.png)