-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Toolbar: Adjust colors for dark mode support #69278
base: trunk
Are you sure you want to change the base?
Toolbar: Adjust colors for dark mode support #69278
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
Thanks for the PR!
Considering that color theming was planned for the @wordpress/components
, this seems like a good approach.
One thing that bothers me is that it will no longer match the color theme of the popover. I'm not sure if color theming was planned for the popover/dropdown as well:
cc @WordPress/gutenberg-components
A few considerations:
As mentioned above, we are a bit in the middle of a transition to theming UI — as such, not every component is currently themed. As a general rule of thumb, I'd say that popovers and dropdowns should also be themed — although, to make sure, it would be better to get some design feedback (@WordPress/gutenberg-design ), and I'm not sure about how much capacity the design team currently has. |
Talking from the technical side, I was planning to experiment with this (i.e. theming across React portals), but I never got to it. It's probably a very separate problem from the scope of this PR, so I wouldn't consider it a blocker for this to land. |
related to #66454
What?
This PR updates the toolbar components ( ToolbarGroup and Toolbar ) to use theme-adaptive color variables instead of hardcoded values, ensuring correct styling in both light and dark modes.
Why?
Previously, the toolbar components used hardcoded colors like $white and $gray-900, leading to inconsistent styling, especially in dark mode. Issues included:
• Toolbars had a white background in dark mode, making elements hard to see.
• Borders didn’t adjust properly to theme colors.
• The ::before pseudo-element used $gray-900, which didn’t adapt well to dark mode.
How?
Testing Instructions
Screenshots or screencast
2025-02-21.20-08-03.mp4