-
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
Navigation: Move block CSS to JSON #41898
Conversation
I wonder whether this PR will fix #41146 |
Size Change: +10 B (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
b00e802
to
7c7e4f9
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.
Added the Needs Dev Note label in case this needs a dev note (either individual or as part of a "misc" dev note) for WP 6.1 release. |
Maybe encapsulated in this post: https://make.wordpress.org/core/?p=98557&preview=true |
Thanks @scruffian. Might it be worth adding the #dev-notes tag to that post? |
I think this is covered by the dev note here: #34180 (comment) |
What?
When themes want to override the hover color of the navigation block, this is not possible using theme.json, because this CSS selector is too strong.
The same is true for
textDecoration
.Why?
We need to allow themes to set the hover color and text-decoration of links inside the navigation block using theme.json, so it can be edited by users.
How?
This moves the style rules from the block CSS to JSON.
Testing Instructions
This needs to be tested alongside this PR: #41786
You can test using the Stewart theme, and this PR: Automattic/themes#6121
Without this PR, the link hover colors and text-decoration inside the navigation block are inheriting from the link color and text-decoration
With this PR the link hover colors and text-decoration inside the navigation block use the settings from theme.json
Screenshots or screencast
Before:
After:
@WordPress/block-themers