[wp-trac] [WordPress Trac] #63245: Twenty Twenty-One: Search block submit button text is invisible when wrapped in a block with background color
WordPress Trac
noreply at wordpress.org
Tue Apr 8 08:02:52 UTC 2025
#63245: Twenty Twenty-One: Search block submit button text is invisible when
wrapped in a block with background color
---------------------------+------------------------------
Reporter: wildworks | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 5.7
Severity: normal | Resolution:
Keywords: | Focuses: css
---------------------------+------------------------------
Comment (by sourav08):
Hey, just a quick update!
I checked and compared the button colors across multiple themes, and
noticed that in most cases, the button color remains consistent regardless
of the background color applied to the parent block.
However, in the Twenty Twenty-One theme, the button color does change
based on the background color — specifically, whether it's a light or dark
background. Can someone confirm if this is the intended behavior for this
theme?
📹 Reference (screen recording):
https://www.awesomescreenshot.com/video/38502545?key=8aa7f281cc9c2e63fd8b2568d3f5c23b
Additionally, for theme palette colors, we can see that local background
and text color variables (--local--color-background, --local--color-
primary) are being defined. But for custom colors (i.e., colors not
defined in the theme palette), these variables are not set, which causes
inconsistent styling.
We might need to define default fallback values for these local variables
to ensure consistent behavior when using custom colors.
🎨 Reference (color-palette.scss):
https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-
content/themes/twentytwentyone/assets/sass/07-utilities/color-palette.scss
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63245#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list