Navigation: Try removing :where rules for padding and changing the default behavior#42965
Closed
jasmussen wants to merge 2 commits into
Closed
Navigation: Try removing :where rules for padding and changing the default behavior#42965jasmussen wants to merge 2 commits into
jasmussen wants to merge 2 commits into
Conversation
|
Size Change: -176 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
Contributor
Author
|
Closing in favor of #42967. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Followup to #42964 and merges into it.
This is a separate PR in order to not block the other one, which may be more important.
Why?
As noted in #42964, customizing the padding of menu items using theme.json is currently broken. Example code:
This PR enables that to work.
How?
The main change is removing the default menu item padding that the block ships with. Meaning that if you apply a background color to the main navigation block, no padding is added, text sits flush against the edge:
This includes padding for submenu items:
That is the main tradeoff of this PR. Could we mitigate this with surfacing the padding control for the main navigation block in the inspector?
A side benefit of removing that default padding, outside of enabling theme.json to work, is that it removes additional
:whererules. See #39230 for more.Testing Instructions
Please follow the same testing instructions as those outlined in #42964, but with the added testing of submenus in themes that do not customize navigation item paddings.