Repository navigation
Block Supports: Add translate property on X and Y axis to Transform supports - #86282
Draft
aaronrobertshaw wants to merge 8 commits into
Draft
aaronrobertshaw wants to merge 8 commits into
aaronrobertshaw wants to merge 8 commits into
Conversation
🤖 PR meta 🤖📦 Bundle sizeSize Change: +1.09 kB (+0.01%) Total Size: 8.64 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. Page List converts to Navigation Links with entity bindings in
|
aaronrobertshaw
force-pushed
the
add/transform-block-support
branch
from
November 9, 2026 11:34
a49cb25 to
45793e8
Compare
aaronrobertshaw
force-pushed
the
add/transform-translate
branch
2 times, most recently
from
November 10, 2026 17:03
d765b3a to
3256c31
Compare
aaronrobertshaw
force-pushed
the
add/transform-block-support
branch
from
November 11, 2026 03:51
4584d08 to
acaae5c
Compare
aaronrobertshaw
force-pushed
the
add/transform-translate
branch
from
November 11, 2026 03:55
3256c31 to
a17eee9
Compare
aaronrobertshaw
force-pushed
the
add/transform-block-support
branch
from
November 11, 2026 07:42
acaae5c to
5132186
Compare
Store style.transform.translate as an object with x and y axes and output the individual translate property, validated in the style engine, theme.json and KSES. Add X offset and Y offset controls to the Transform panel and opt in Group, Heading, Image and Video.
Cover the style engine, theme.json, KSES, the block support, block states, the Transform panel and global styles rendering. Extend the e2e spec with an Image offset, its caption and lightbox, and a Mobile offset on a Heading.
…_html Removing insecure properties skipped every array value, so a safe translate object was dropped on save. It is now kept when its declaration passes, which only happens when every axis is valid.
CSS translate holds both axes, so a block that set only Y reset a Global Styles X to 0 while its inspector still showed X. The block now fills its missing axis when it is output, from the resolved Global Styles value. A state such as @mobile fills first from the block's own value. Nothing is copied into the saved attributes, so later Global Styles changes apply.
aaronrobertshaw
force-pushed
the
add/transform-translate
branch
from
November 11, 2026 07:46
a17eee9 to
8a4cde4
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This builds on #86240 and should merge after it. Its base is that PR's branch.
Related:
What?
Adds an X and Y offset to the Transform block support, through the CSS
translateproperty. It combines with rotation. Group, Heading, Image and Video opt in.Why?
Blocks cannot be nudged away from where the layout puts them. The grid canvas work in #85505, where blocks are placed freely, needs this too.
How?
style.transform.translateis{ x, y }. Each axis is one length or percentage.translateproperty, nevertransform.@mobilefills from the block first. Otherwise the axis is0. This runs at output, never at save.calc(),var(), lists and other values.zkey fails the schema and PHP drops it.Z is left out. It needs
perspectiveon a parent, so it can follow later as one more key.Note
Known gap: a Global Styles variation or state that sets one axis still outputs the other as
0.Testing Instructions
3rem, and every Heading moves.1rem. It keeps X3rem, and the inspector shows it.Screenshots or screencast
translate.mp4
Use of AI Tools
Written with Claude Code, then reviewed and tested.