WordPress.org

Make WordPress Core

Opened 6 weeks ago

Last modified 6 weeks ago

#53161 new defect (bug)

Twenty Twenty-One: Navigation block has a permanent theme-imposed background color

Reported by: kjellr Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.7.1
Component: Bundled Theme Keywords:
Focuses: css Cc:

Description

Twenty Twenty-One provides a default background color to the navigation block. If the block appears inside of a differently-colored container block, this looks incorrect:

https://cldup.com/fb8OTHJzQG.png

https://cldup.com/U6GLVRtEAG.png

If a user attempts to modify this color via the Navigation block controls, only the menu item backgrounds are updated. The theme-provided background persists:

https://cldup.com/kQ8nkqUATP.png

The theme should leave this block transparent by default, so that it will work on a variety of different backgrounds.

Change History (1)

#1 @joyously
6 weeks ago

This is a common problem with menus. It needs to use a CSS Custom property, so it can be consistent in the menu, yet still have a background color for the dropdowns if there are any.
Using transparent doesn't work well for dropdowns.
And yet, the text color needs to go with the chosen background color.

Note: See TracTickets for help on using tickets.