-
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
Update spacing in CircularOptionPicker #36014
Conversation
// @wordpress/components/src/circular-option-picker/style.scss | ||
$swatch-size: 28px; |
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.
This could be removed if we're okay with the spacing not being justified as space-between. We can still keep the 6 columns, and I think it looks okay that way.
Size Change: -39 B (0%) Total Size: 1.08 MB
ℹ️ View Unchanged
|
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.
Turns out your work in #36018 actually addresses most of my feedback above, so all that remains is to add the space-between as suggested.
margin-right: -$color-palette-circle-spacing; | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: $color-palette-circle-spacing; |
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.
As noted, if you add justify-content: space-between;
here, in my testing it appears to space things out more nicely.
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.
The problem with space-between
is that when you have few swatches in your palette, the spacing for the swatches is too much.
I think it's best to leave it as-is here. And in #36018, since we know the number of columns, we can use display: grid
and use space-between
like is done for the gradient picker.
Description
Tightens up the spacing beneath the swatches using modern CSS now that we don't have to support IE.
The gradient toolbar had special CSS written for it before to make it justified space-between. If that's not necessary anymore, I can remove even more CSS.
How has this been tested?
The CircularOptionPicker is used in the color, gradient, and duotone pickers. Make sure that wrapping looks good in the cases where there are more swatches than can fit in a line.
Screenshots
Before
After
Checklist:
*.native.js
files for terms that need renaming or removal).