Skip to content

Navigation block: item link color style property missing in 13.6.0 #42253

@adamwoodnz

Description

@adamwoodnz

Description

A bug was found in wordpress.org and make.wordpress.org where the color of links in the navigation block changed. The root cause was found to be a CSS property being dropped in Gutenberg 13.6.0, due to a change to the navigation block in this PR

In 13.5.1 this CSS rule meant that the links would inherit the white color from the parent's style

.wp-block-navigation .wp-block-navigation-item__content {
    color: inherit;
}

In 13.6.0 this was supposed to still exist but be added via block.json. This missing property means that the links are the default blue set for anchors, leading to very poor color contrast with the dark background.

For now we have patched the styles on wordpress.org but we'd like to remove this once this bug is resolved.

It seems the changes in #41898 aren't working as expected so it would be good to find out the root cause, as maybe this is more widespread.

Step-by-step reproduction instructions

  1. Go to WordPress.org and inspect one of the navigation links in the header
  2. Observe that the style rule from Gutenberg 13.6.0 does not have color: inherit
    Screen Shot 2022-07-08 at 10 38 09 AM copy
  3. Disable the patch property color: inherit we added to wporg-mu-plugins
    Screen Shot 2022-07-08 at 10 44 33 AM copy
  4. Observe that all the links are blue instead of white

Screenshots, screen recording, code snippet

No response

Environment info

WordPress 6.1-alpha-53680
Gutenberg 13.6.0
All browsers on MacOS

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

Metadata

Metadata

Assignees

Labels

Needs Technical FeedbackNeeds testing from a developer perspective.Needs TestingNeeds further testing to be confirmed.[Block] NavigationAffects the Navigation Block[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions