-
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
Incorrect border radius when only one color panel item #55051
Comments
To clarify, the The catch here is that the color panel actually has two tools panel items. The second one is the overlay slider that was injected into the color panel in #43838. It receives the I'll see what I can do to get the correct border radii on the color items. |
One option in terms of a fix is available in #55071 however it relies on a generated class name by the ToolsPanel components so might not be acceptable. |
Hey folks, I took a look and I'll leave a few thoughts:
|
Thanks for weighing in @ciampo 👍
This was explored when the color panel was converted to the tools panel. Off the top of my head, there were a couple of issues with this including the fact that non-Item controls could be rendered into the panel's slot and that to ensure consistent order of controls those that aren't currently being displayed still require a placeholder element to hold the position in the DOM. |
#34027 provides some context as to why
I don't think this covers the situation where hidden placeholder elements are in the DOM to maintain order of controls given slots don't guarantee the order of their fills. In the example sandbox linked if you add The first/last classes were added to avoid the need to target the dynamic classes generated by the component. |
Trying an alternative approach in #55207, hopefully it works well! |
The border radius is incorrect if there is only one color panel item. It should be
$radius-block-ui
on all corners.We currently add
.first
and.last
classes to the.block-editor-tools-panel-color-gradient-settings__item
, but they don't account for when there is only one item.You can see this example within the Featured Image block.
The text was updated successfully, but these errors were encountered: