Repository navigation
Block Supports: Add a uniform scale to Transform supports - #86727
aaronrobertshaw wants to merge 4 commits into
Conversation
🤖 PR meta 🤖🎉 PropsIf 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +520 B (+0.01%) Total Size: 8.67 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Undo restores the post selection when another synced entity is loaded (RTC WebSocket) in
|
c805078 to
71daabc
Compare
fa7600f to
911ed9f
Compare
There was a problem hiding this comment.
Just a quick drive-by comment from playing around with this. It's so cool! For me personally, I think it'll be a really fun one for the Button block, especially with states like hover. I.e. here's how that can look with rotation, scale, and a little shadow:
2026-11-16.12.07.00.mp4
A very minor note, but while playing around making the above, I found myself wanting a range control slider for scale, as for this kind of design it's more about playfully messing around with values rather than going for something precise. I liked being able to drag the dial on the rotation control, so felt a similar desire to grab and drag a slider for scale, too 😄. Worth trying here?
(Haven't looked at the code yet, but will take a look through the stack this week)
71daabc to
1fe333c
Compare
911ed9f to
545ffca
Compare
|
It might be more intuitive to present scale as a percentage, I guess that would also fix the keyboard interaction too. |
1fe333c to
34f995f
Compare
545ffca to
b3c19c5
Compare
34f995f to
0b6467e
Compare
b3c19c5 to
439e760
Compare
0b6467e to
55ad7b9
Compare
439e760 to
0c47a94
Compare
55ad7b9 to
f556e33
Compare
0c47a94 to
bb0ef67
Compare
f556e33 to
040fc31
Compare
0797f4a to
1c1b9c1
Compare
|
Thanks for all the testing and feedback here 🙇 We can definitely tweak the UI. Given the stack of Transform block support PRs and several UX enhancements as separate PRs to follow them. I might bump the UI tweaks here to a follow up and have this merged sooner and iterate. For now, I'll leave this open until I get the base Transform and UX improvements merged. Then I'll roll this out and iterate in quick succession. |
1c1b9c1 to
2d5cff8
Compare
The scale feature saves a single non-negative number or percentage inline like the rotation and offset. A numeric 0 is kept: the style engine reads numeric transform values as strings, so the support, block style states and Global Styles all output it. Group, Heading and Video adopt it. Transform tools, including the scale, are switched on by appearanceTools.
The theme.json schema tests for scale now use Group, so they do not depend on the Image block.
2d5cff8 to
770bb88
Compare


Important
This builds on #86282 and should merge after it. Its base is that PR's branch.
Related:
What?
Adds a scale to the Transform block support, through the CSS
scaleproperty. Group, Heading and Video opt in.Why?
Blocks cannot grow or shrink without changing their content or layout. A featured card is a common case.
How?
style.transform.scaleis one non-negative number, such as1.2, or a percentage, such as"120%".scaleproperty, nevertransform, saved inline like the rotation. A0is kept.calc()andvar().1. The slider stops at 3; typing goes up to 10. Clearing lets an inherited scale show again.appearanceTools, settings and skip serialization.Testing Instructions
Use a theme with
appearanceTools, such as Twenty Twenty-Five.1.1.0.8wins.Screenshots or screencast
86727-scale.mp4
Use of AI Tools
Written with Claude Code, then reviewed and tested.