-
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
Consolidate editor/canvas resize handles #60712
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: -6.02 kB (-0.34%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
Nice! We need to account for the focus style here. I'm not sure if the one in the edit-site-resizable-frame__inner does not have one, but they should be 1:1 (and perhaps focus:visible). I also noted the drag handle in focus mode is a bit different height, and gets smaller + thicker on selection. I think the "grab" effect of it getting smaller is fine, but not thicker. If both handles responded like that, we'd be solid. |
Thanks for reviewing, Rich! Indeed, the focus state was an oversight. I'll push fixes to your comments soon. |
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
border-radius: $radius-block-ui; | ||
} | ||
|
||
&.is-left { | ||
left: -$grid-unit-20; | ||
// Subtract half of the handle width to properly center. | ||
left: -$grid-unit-20 - ($grid-unit-05 / 2); |
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.
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.
} | ||
|
||
&.is-right { | ||
right: -$grid-unit-20; | ||
// Subtract half of the handle width to properly center. | ||
right: -$grid-unit-20 - ($grid-unit-05 / 2); |
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.
@juanfra this is causing a deprecation warning:
You can fix it with right: -$grid-unit-20 - ($grid-unit-05 * 0.5)
.
What?
Consolidate the resize handles.
Fixes: #60053
Why?
To have the resize handles looking and working the same way in the different touchpoints, bringing a more cohesive experience.
How?
Applying the same styles, relying on the admin theme accent, and adding the motion effect for the resize handle within the editor.
Testing Instructions
Screenshots or screencast
resize-canvas.mov