-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Try: Remove padding from menu items when no background #30805
Conversation
Size Change: +318 B (0%) Total Size: 1.43 MB
ℹ️ View Unchanged
|
3af17af
to
a5df608
Compare
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.
Submenu items align as well with their parents, both with and without background color.
Apr-22-2021.14-04-35.mp4
Thanks so much for the review and the merge, I think this one should be able to open up a number of great starting patterns! I still have some submenu and color work to do (see #30831), and there are some z-index issues with multiple menus that I'd love to address. But all of this, as with of course any followups I need to do as a result of this one, it's all on my list and you know where to find me 👌 |
Description
I'd like to try and make this pattern for the navigation block:
But I can't, because individual menu items have a built-in padding:
While it would be nice to implement consistent dimension controls so paddings can be customized (and that will still be nice and possible once #28356 lands), this PR implements a new default, which fixes this:
The idea is pretty simple:
Here are two examples. No background — notice how the navigation item aligns with the post title:
Yes background:
How has this been tested?
The testing instructions are:
When no background is there, the padding from menu items should be gone, but items should still be spaced harmoniously, inside and outside of submenus.
When there is a background, it should look the same as today.
Here's some testing content:
☝️ That's tested with TwentyTwelve, you might need to add background colors again if you test in another theme. I will look at that use of has-background separately.
Checklist:
*.native.js
files for terms that need renaming or removal).