-
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
Global Styles: Use text and button background color for color indicators #59514
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. |
Size Change: +29 B (0%) Total Size: 1.73 MB
ℹ️ View Unchanged
|
I do like that these are more representative of the application of style, rather than the palettes themselves. |
What alternative would you want to try? |
If the button background color is the same as the text color then we should try to find an alternative IMO |
@scruffian @richtabor What about user-defined, something like below. With fallbacks as already proposed? Note the
|
@bgardner I would prefer that we don't add more APIs just for the sake of the preview. What about if we used the first 2 colors from the palette, that aren't the background/text colors? |
@scruffian Isn't that what is happening now? For context, here is what my Variation previews currently look like: |
Oh yeah I think you're right! |
But they're arbitrary; there may be a color in the style selector that isn't used prominently, which results in an unclear response if the style was successfully applied. And the colors could likely clash/blend in visually with the background color of the site/selector, making it less clear and less encouraging of a selection. |
I rebased this to pull in the latest changes. |
Flaky tests detected in f4e4a5c. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/8543716245
|
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.
LGTM. Let's follow up to explore how theme authors can choose specific colors for their previews as well (still maintaining this as the fallback): #59444 (comment)
…59514) Co-authored-by: scruffian <scruffian@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org> Co-authored-by: bgardner <bgardner@git.wordpress.org> Co-authored-by: mtias <matveb@git.wordpress.org> Co-authored-by: spencerfinnell <spencerfinnell@git.wordpress.org>
What?
Changes the color indicators for style panels.
Fixes #59444.
Why?
The aim is to make the color palette selection clearer, but I'm not yet convinced this is the right solution.
How?
The two colors are
styles.text.color
andstyles.elements.button.background
.Testing Instructions
Screenshots or screencast
Before:
After: