-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Use inset shadow on color indicators and adjust spacing #37500
Conversation
Size Change: +27 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
Nice! I was just thinking about the borders we use for the color circles needing to become inset as well. How does it look for white colors? Instead of a pseudo element, could you use an inset box shadow on the element itself? |
Good call, we don't need the pseudo here. I just used the same mechanism that's in place for the color circles elsewhere.
Here's a shot of different colors: |
Looks excellent to me. I'd be happy to give this one and the other one a green check, but I'm afk at the moment. I'll see if I can greenlight them tomorrow, sound good? Thanks for the work! |
Sounds good! |
Nice PR. Before, the gray border is very visible and awkward: After, the gray swatch border looks less present, but still there for white backgrounds: The gap looks a bit small now. Instead of 6px should we just go with I wanted to bring attention to #37028 where I recently touched the same component — initially also the ItemGroup component, but I ended up rebasing that out. Some of the key takeaways was to look at how this affected other contexts that used this color indicator, and as best I can tell, this PR is fine with the changes. But I do think we'll need to add a small changelog notice. You can see the one I added in https://github.com/WordPress/gutenberg/pull/37028/files#diff-b5aa808176801bfde2277ac886bbbdf0863de109950303cdb89e2d33ebe16a28R30 as an example. The PR also needs a rebase for the failing test to pass, then I'd be happy to take a second look. There's a lot of AFK going on right at the moment, I'll still be here Monday, but things might be moving slower than usual. Thanks for the work! |
See #37522 |
ddaea80
to
228bc4c
Compare
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 work. Let's try this!
Description
I noticed that the color indicators were using a border, instead of an inset shadow (which we use elsewhere for colors). With a border, those indicators would lead to "fuzzy" edges with most color choices. By using the inset shadow, we resolve that.
I also tweaked the spacing around the color indicators to bring them closer together and space them appropriately from the label.
How has this been tested?
Tested locally.
Screenshots
Before:
After:
Types of changes
CSS