Open talldan opened 2 months ago
I am not sure I understand -colors set on the parent, are intended to override the color on the child, unless the child also has a color set.
@carolinan Sorry, I missed the ping. The main thing is the inconsistency - regular (non-hover) colors and hover colors are working differently.
It's really hard to say how the navigation block is supposed to work, but the e2e tests seems to imply it shouldn't inherit any colors from a wrapping group.
Description
In the editor, group block link hover colors can override the navigation block's hover color. This is an inconsistency given the way the frontend works and regular link colors work.
This culprit seems to be this style, which has high specificity due to the
:hover
pseudoselector:So it overrides the blocks styles for the navigation block that try to prevent this:
Note, there seems to be an e2e test that is supposed to catch this regression: https://github.com/WordPress/gutenberg/blob/fced0917da12bb4eeb8c6f1df7cd1aa11275fd96/test/e2e/specs/editor/blocks/navigation-colors.spec.js#L131-L185
But while it sets group block link hover styles, it doesn't assert that the navigation hover styles are correct.
Step-by-step reproduction instructions
Also view the front end of the site and observe that link and link hover colors aren't applied, so this seems to be an inconsistency only in the editor.
Screenshots, screen recording, code snippet
No response
Environment info
Reproduced on WordPress 6.5 & 6.6
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes