-
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
Improve theme.json support for Navigation block #39052
Comments
Excellent list, thank you! I would also add: overlay menu padding that potentially inherits from a smarter global padding (#35607), but is still individually configurable. One consideration to keep in mind for the overlay menu properties is in case it becomes possible to edit the contents separately for total customization. |
Worthing adding to #38275 ? |
Yes please! |
May I add here that currently the theme.json block settings for colors on the nav block are unresponsive. I would be nice if this works too!
|
What would you expect |
To disable the color controls for the user in the block editor for this specific block. Specifically, for theme authors who do not want to give color controls to users (clients) on the menu blocks. It was my assumption that this table theme.json v2 - living reference will be applicable for all blocks (eventually). |
I believe this is a correct assumption :) |
We also should have a way to target the typography inside the overlay: #39352 I am starting to wonder if the overlay should be a separate block... |
I had some issues with the .has-background class that were coupled with the color styling of submenu background. It is a tad weird and confusing. Would give another possible argument for splitting these two (submenu and menu overlay) Since I've been working this week on testing the menu block in my own starter theme, I've come upon some other 'theme.json for navigation' related here: #39263 , maybe relevant to your list. |
Would that enable or simplify this? |
It should. I've been thinking about it as well. |
It looks like the Nav block already has Gap support. |
Was about to write an issue for the states when I saw this one! Would be great to have hover, active and visited states on these as they're links. Should be copy/paste-able from the link block. :) |
Related #44712 |
We also can not do this to style navigation, this is much needed
|
I found this isn't due to lack of support, but instead a bug where there is a "color: inherit" class that takes precedence... it's in a bug ticket somewhere here. In the meantime you can make it work by using !important:
|
What problem does this address?
There are many settings available to the navigation block which cannot be customized in theme.json. It is beneficial to themes to be able to style blocks via theme.json rather than in block settings, as it means themes can share patterns and simply modify the navigation via theme.json, rather than each theme needing to create its own header to adjust the navigation.
What is your proposed solution?
It is already possible to set colors and typography for the navigation block in theme.json, but the following properties would also be helpful:
This is list is a good starting point but we should anticipate other properties also being needed.
cc @getdave @draganescu
The text was updated successfully, but these errors were encountered: