-
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
Add proper padding to ColorGradientControl #37502
Conversation
Size Change: +15 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
Thanks for the effort! Since it's touching also the color palette component, I'd love a sanity check from @ciampo or @mirka (not urgent), and we might need a changelog note. Wanted to also note that the failing tests will likely pass after a rebase, since #37501 has been merged. Visually, this looks like a good small improvement to what's shipping in trunk and seems fine to land. One of the longer term efforts we have is to move towards some of the designs outlined in #35093, with more intently designed popovers, specifically ones where the color palettes or custom swatches can go edge to edge. One of the challenges we need to solve there is figuring out our popover styles, whether we can go borderless with a shadow and clearer eye-dropper symbol, or whether we need to integrate some border of delineation with the canvas. Notably this mockup takes a not entirely successful stab at merging the edge-to-edge elements with a border. Right now there are a few diverging styles going on, with an opportunity to unify and simplify, and I'm excited for us to get to that. In the mean time, as a small padding change, this feels great. |
padding: $grid-unit-10; | ||
|
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.
Since this component can be used in other (e.g. not in a popover) contexts as well, I think it would be better not to give it inherent padding, and instead make the consumer component responsible for adding whatever padding is desired.
For example, we could add a padding wrapper div here:
gutenberg/packages/block-editor/src/components/colors-gradients/dropdown.js
Lines 74 to 86 in f814026
<ColorGradientControl | |
showTitle={ false } | |
{ ...{ | |
colors, | |
gradients, | |
disableCustomColors, | |
disableCustomGradients, | |
__experimentalHasMultipleOrigins, | |
__experimentalIsRenderedInSidebar, | |
enableAlpha, | |
...setting, | |
} } | |
/> |
This way we only affect our specific dropdown use case.
Closing as this is no longer needed. |
Description
Adds missing padding to the ColorGradientControl Dropdown, so that it is consistent with other Dropdown within the editor, and gives the UI visual space from the edge of the dropdown.
Screenshots
Before
After
Reference
Types of changes
CSS