Skip to content

Block Supports: Add a Transform block support with a rotate feature - #86240

Merged
aaronrobertshaw merged 25 commits into
trunkfrom
add/transform-block-support
Nov 20, 2026
Merged

aaronrobertshaw merged 25 commits into
trunkfrom
add/transform-block-support

Conversation

@aaronrobertshaw

@aaronrobertshaw aaronrobertshaw commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Related:

Core backport:

Follow-up explorations, as draft PRs:

What?

Adds a Transform block support with rotation as its first feature. Group, Heading and Video opt in. Image follows in #86955.

Why?

Site owners and themes cannot rotate a block. A separate Transform support lets scale or translate follow without schema changes.

How?

It works like Border and Shadow:

  • Value: style.transform.rotate holds one CSS angle. Anything else is dropped.
  • Output: the rotate property, never transform, saved inline on the wrapper, or from the apply callback for dynamic blocks.
  • Inner elements: a block skips serialization and uses getTransformClassesAndStyles() or gutenberg_get_transform_classes_and_styles(). Feature selectors are for Global Styles and block states only.
  • Settings: off by default, on with appearanceTools or settings.transform.rotate.
  • States: :hover and viewport rotations use the shared block states path.
  • Global Styles: a Transform panel in both site editors.
  • UI: a unit input with a slider, in deg, turn, rad or grad.

Testing Instructions

Use a theme with appearanceTools, such as Twenty Twenty-Five.

  1. On a Group, set Styles > Transform > Rotation. It rotates in the editor and front end.
  2. Turn on View > Responsive styles. On a Heading, set a rotation for Mobile only. Desktop stays level.
  3. Give Heading a theme.json rotation of "-0.025turn". Global Styles shows it in turn.
  4. Set -45deg on one Heading, then clear it. It goes back to the theme.json value.

Screenshots or screencast

86240-rotation.mp4

Use of AI Tools

Written with Claude Code, then reviewed and tested.

@aaronrobertshaw aaronrobertshaw added [Type] Enhancement A suggestion for improvement. [Feature] Block API API that allows to express the block paradigm. [Package] Blocks /packages/blocks [Package] Block library /packages/block-library [Package] Block editor /packages/block-editor [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Package] Style Engine /packages/style-engine labels Nov 3, 2026
@aaronrobertshaw aaronrobertshaw self-assigned this Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground Preview in Storybook

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: +1.39 kB (+0.02%)

Total Size: 8.68 MB

📦 View Changed
Filename Size Change
build/modules/lazy-editor/index.min.js 14.6 kB +13 B (+0.09%)
build/scripts/block-editor/index.min.js 557 kB +974 B (+0.18%)
build/scripts/block-library/index.min.js 427 kB +16 B (0%)
build/scripts/blocks/index.min.js 44.9 kB +18 B (+0.04%)
build/scripts/core-data/index.min.js 77.9 kB +49 B (+0.06%)
build/scripts/edit-site/index.min.js 383 kB +57 B (+0.01%)
build/scripts/editor/index.min.js 572 kB +77 B (+0.01%)
build/scripts/style-engine/index.min.js 2.35 kB +97 B (+4.3%)
build/styles/block-editor/style-rtl.css 20.1 kB +20 B (+0.1%)
build/styles/block-editor/style-rtl.min.css 17.1 kB +21 B (+0.12%)
build/styles/block-editor/style.css 20.2 kB +22 B (+0.11%)
build/styles/block-editor/style.min.css 17.1 kB +21 B (+0.12%)

8e80e95 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 645fc34 trunk % Change
timeToFirstByte 47.6 ms +8.72% -6.83% 45.85 ms +10.47% -4.25% 3.82%
largestContentfulPaint 76 ms +10.53% -5.26% 72 ms +8.33% -5.56% 5.56%
lcpMinusTtfb 26.3 ms +26.43% -7.22% 24.85 ms +26.36% -4.63% 5.84%
wpBeforeTemplate 24.27 ms +12.53% -5.85% 23.97 ms +11.51% -4.42% 1.25%
wpTemplate 18.4 ms +2.61% -5.43% 17.87 ms +6.77% -4.92% 2.97%
wpTotal 43.3 ms +10.35% -5.59% 41.51 ms +12.43% -2.6% 4.31%
wpMemoryUsage 7.75 MB +0% -0% 7.71 MB +0% -0% 0.5%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 645fc34 trunk % Change
timeToFirstByte 38.9 ms +4.88% -7.2% 38.25 ms +11.11% -4.58% 1.7%
largestContentfulPaint 70 ms +2.86% -8.57% 72 ms +0% -8.33% -2.78%
lcpMinusTtfb 31.25 ms +3.68% -5.28% 29.95 ms +7.35% -5.34% 4.34%
wpBeforeTemplate 21.06 ms +7.5% -6.98% 20.9 ms +7.22% -4.74% 0.77%
wpTemplate 13.64 ms +15.1% -5.57% 13.97 ms +9.81% -5.08% -2.36%
wpTotal 35.86 ms +5.27% -7.89% 35.23 ms +8.26% -4.77% 1.79%
wpMemoryUsage 6.44 MB +0% -0% 6.40 MB +0% -0% 0.6%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 645fc34 trunk % Change
mediaProcessingJpeg 331.02 ms +3.95% -1.15% 333.67 ms +5% -0.67% -0.79%
mediaProcessingAvif 5023.37 ms +3.2% -0.98% 4990.68 ms +2.51% -1.11% 0.66%
mediaProcessingJpegToAvif 3489.45 ms +1.5% -1.58% 3529 ms +1.74% -1.84% -1.12%

media-upload

Metric 645fc34 trunk % Change
jpegUploadProcessing 1519.57 ms +3.58% -3.17% 1469.57 ms +0.99% -0.73% 3.4%
pngUploadProcessing 260.72 ms +2.19% -4.56% 241.27 ms +6.53% -5.83% 8.06%
largeJpegUploadProcessing 1461.11 ms +2.53% -0.66% 1453.43 ms +0.75% -0.55% 0.53%
multipleImageUploadProcessing 1640.34 ms +7.31% -4.93% 1522.64 ms +11.09% -2.08% 7.73%

post-editor

Metric 645fc34 trunk % Change
serverResponse 480.8 ms +1.93% -7.08% 483.57 ms +1.82% -8.97% -0.57%
firstPaint 407.82 ms +9.7% -8.1% 400.81 ms +6.36% -1.41% 1.75%
domContentLoaded 820.69 ms +1.89% -1.53% 813.29 ms +0.77% -0.55% 0.91%
loaded 821.75 ms +1.87% -1.51% 814.34 ms +0.75% -0.57% 0.91%
firstContentfulPaint 466.57 ms +2.47% -1.77% 462.93 ms +3.14% -1.96% 0.79%
firstBlock 2184.4 ms +1.25% -0.99% 2178.39 ms +0.47% -0.82% 0.28%
type 17.86 ms +5.32% -12.26% 18.25 ms +4.66% -17.7% -2.14%
typeWithoutInspector 16.48 ms +10.86% -1.64% 18.05 ms +5.48% -5.21% -8.7%
typeWithTopToolbar 23.69 ms +4.77% -8.06% 24.5 ms +3.02% -4.2% -3.31%
typeContainer 8.7 ms +5.52% -19.66% 8.27 ms +8.34% -14.75% 5.2%
focus 120.74 ms +5.92% -3.88% 113.35 ms +9.31% -1.66% 6.52%
firstFocus 260.38 ms +0% -0% 275.9 ms +0% -0% -5.63%
selectAll 406.65 ms +3.16% -0.14% 427.5 ms +2.2% -0.74% -4.88%
undo 28.59 ms +6.3% -6.12% 29.42 ms +7.44% -5.78% -2.82%
listViewOpen 79.3 ms +5.15% -1.87% 79.17 ms +2.73% -3.07% 0.16%
inserterOpen 42.16 ms +2.37% -5.12% 44.38 ms +6.78% -21.54% -5%
inserterHover 10.66 ms +9.66% -8.44% 10.76 ms +9.29% -5.76% -0.93%
inserterSearch 8.11 ms +13.07% -10.97% 8.04 ms +5.35% -5.22% 0.87%
loadPatterns 656.1 ms +3.12% -4.73% 652.47 ms +2.5% -3.15% 0.56%
wpTotal 470.95 ms +2.02% -7.17% 473.79 ms +1.72% -9.13% -0.6%
wpMemoryUsage 14.81 MB +0% -0% 14.77 MB +0% -0% 0.27%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric 645fc34 trunk % Change
serverResponse 477.24 ms +1.17% -0.57% 474.47 ms +1.79% -9.44% 0.58%
firstPaint 450.04 ms +3.59% -8.47% 414.61 ms +12.37% -3.35% 8.55%
domContentLoaded 833.55 ms +2.02% -1.7% 852.31 ms +1.99% -1.4% -2.2%
loaded 834.43 ms +2.02% -1.66% 853.92 ms +1.91% -1.46% -2.28%
firstContentfulPaint 465.51 ms +2.11% -2.17% 476.51 ms +1.59% -1.54% -2.31%
firstBlock 2573.41 ms +1.93% -1.06% 2628.62 ms +0.27% -0.33% -2.1%
type 17.48 ms +7.44% -4.41% 17.93 ms +8.53% -8.81% -2.51%
navigate 113.28 ms +5.37% -5.8% 117.2 ms +5.03% -4.15% -3.34%
loadPatterns 1390.65 ms +6.92% -9.09% 1269.6 ms +4.41% -11.96% 9.53%
loadPages 1000.85 ms +8.67% -1.93% 948.58 ms +4.25% -0.9% 5.51%
wpTotal 467.88 ms +1.13% -0.59% 464.89 ms +1.81% -9.62% 0.64%
wpMemoryUsage 12.83 MB +0% -0% 12.79 MB +0% -0% 0.32%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

8e80e95 Run

🏁 Flaky tests

Some 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.

As a user I want to be able to add multiple close buttons so that users can close the overlay from different positions in /test/e2e/specs/site-editor/navigation-overlay-template-part.spec.js, passed after 1 failed attempt.
Error: expect(locator).toHaveCount(expected) failed

Locator:  getByRole('button', { name: 'Close' })
Expected: 2
Received: 1
Timeout:  5000ms

Call log:
  - Expect "toHaveCount" getByRole('button', { name: 'Close' }) with timeout 5000ms
  - waiting for getByRole('button', { name: 'Close' })
    14 × locator resolved to 1 element
       - unexpected value "1"

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-overlay-template-part.spec.js:228:33
should select synced pattern in /test/e2e/specs/editor/various/writing-flow.spec.js, passed after 1 failed attempt.
Error: expect(locator).toBeFocused() failed

Locator:  locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]')
Expected: focused
Received: inactive
Timeout:  5000ms

Call log:
  - Expect "toBeFocused" locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]') with timeout 5000ms
  - waiting for locator('[name="editor-canvas"]').contentFrame().locator('[data-type="core/block"]')
    14 × locator resolved to <div tabindex="0" role="document" draggable="true" data-title="Pattern" data-type="core/block" data-is-drop-zone="true" aria-label="Block: Pattern" id="block-25b2cd72-26ab-49b7-a29d-7b89712fea5e" data-block="25b2cd72-26ab-49b7-a29d-7b89712fea5e" class="block-editor-block-list__block wp-block is-selected is-reusable block-library-block__reusable-block-container wp-block-block block-editor-block-list__layout">…</div>
       - unexpected value "inactive"

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/writing-flow.spec.js:1464:5

8e80e95 Run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new bundle can call an undefined hook when paired with an older wp.blockEditor, crashing the block screen or Blocks list.

3 open issues
What changed in this PR

Adds Transform block support with rotation as its first feature, integrating editor controls, Global Styles, and front-end rendering. Group, Heading, Image, and Video opt in.

Changes:

  • Stores rotation in style.transform.rotate and outputs the individual CSS rotate property through wrapper or feature selectors.
  • Adds Transform panels and shared responsive/state styling, while keeping enlarged lightbox images unrotated.
  • Updates schemas, documentation, changelogs, and automated coverage.
File Description
test/​integration/​theme-schema.test.js Tests permitted rotation style locations.
test/​e2e/​specs/​editor/​various/​block-transform-rotate.spec.js Covers image rotation, captions, and lightbox behavior.
schemas/​json/​theme.json Defines transform settings and styles.
schemas/​json/​block.json Defines transform support and selectors.
phpunit/​style-engine/​style-engine-test.php Tests rotation declaration generation.
phpunit/​kses-rotate-test.php Tests allowed and rejected rotation values.
phpunit/​class-wp-theme-json-test.php Tests theme rotation rendering and sanitization.
phpunit/​block-supports/​transform-test.php Tests wrapper and feature-selector output.
phpunit/​block-supports/​states-test.php Tests responsive and hover rotation output.
packages/​style-engine/​src/​types.ts Adds rotation style typing.
packages/​style-engine/​src/​test/​index.js Tests JavaScript rotation compilation.
packages/​style-engine/​src/​styles/​transform/​index.ts Validates angles and generates rotation rules.
packages/​style-engine/​src/​styles/​index.ts Registers transform style definitions.
packages/​style-engine/​src/​class-wp-style-engine.php Adds PHP angle validation and declarations.
packages/​style-engine/​CHANGELOG.md Records transform style support.
packages/​global-styles-ui/​src/​screen-block.tsx Adds the block-level Transform panel.
packages/​global-styles-ui/​src/​screen-block-list.tsx Recognizes transform-enabled blocks.
packages/​global-styles-ui/​CHANGELOG.md Records Transform panel availability.
packages/​global-styles-engine/​src/​settings/​get-setting.ts Recognizes the rotation setting.
packages/​global-styles-engine/​CHANGELOG.md Records the new setting.
packages/​blocks/​src/​api/​constants.ts Maps rotation to transform support.
packages/​blocks/​CHANGELOG.md Records rotation property metadata.
packages/​block-library/​src/​video/​README.md Documents Video rotation support and targeting.
packages/​block-library/​src/​video/​block.json Enables rotation on the video element.
packages/​block-library/​src/​image/​style.scss Resets rotation on enlarged lightbox images.
packages/​block-library/​src/​image/​README.md Documents Image rotation support and targeting.
packages/​block-library/​src/​image/​block.json Enables rotation on the image element.
packages/​block-library/​src/​heading/​README.md Documents Heading rotation support.
packages/​block-library/​src/​heading/​block.json Enables Heading rotation.
packages/​block-library/​src/​group/​README.md Documents Group rotation support.
packages/​block-library/​src/​group/​block.json Enables Group rotation.
packages/​block-editor/​src/​hooks/​utils.tsx Includes rotation in resolved block settings.
packages/​block-editor/​src/​hooks/​types.ts Defines transform hook types.
packages/​block-editor/​src/​hooks/​transform.tsx Implements inspector integration and editor styling.
packages/​block-editor/​src/​hooks/​test/​transform.jsdom.test.ts Tests transform style routing.
packages/​block-editor/​src/​hooks/​test/​style.jsdom.test.tsx Tests hover and responsive rotation rules.
packages/​block-editor/​src/​hooks/​supports.ts Recognizes transform as a style support.
packages/​block-editor/​src/​hooks/​style.tsx Integrates controls and delegates transform serialization.
packages/​block-editor/​src/​hooks/​index.ts Registers the transform editor hook.
packages/​block-editor/​src/​components/​inspector-controls/​groups.ts Adds the transform controls group.
packages/​block-editor/​src/​components/​inspector-controls-tabs/​use-inspector-controls-tabs.ts Includes transform controls in tab detection.
packages/​block-editor/​src/​components/​inspector-controls-tabs/​styles-tab.tsx Adds the Transform panel slot.
packages/​block-editor/​src/​components/​global-styles/​types.ts Defines transform settings and panel types.
packages/​block-editor/​src/​components/​global-styles/​transform-panel.tsx Adds rotation controls and angle conversion.
packages/​block-editor/​src/​components/​global-styles/​test/​transform-panel.jsdom.test.tsx Tests conversion, editing, and reset behavior.
packages/​block-editor/​src/​components/​global-styles/​index.ts Exports the Transform panel and availability hook.
packages/​block-editor/​src/​components/​global-styles/​hooks.ts Disables rotation controls where unsupported.
packages/​block-editor/​src/​components/​block-inspector/​index.tsx Adds default and state-specific Transform slots.
packages/​block-editor/​CHANGELOG.md Records the panel and inspector group.
lib/​theme.json Enables rotation controls by default.
lib/​load.php Loads transform block support.
lib/​compat/​wordpress-7.3/​kses.php Allows and validates rotation declarations.
lib/​class-wp-theme-json-gutenberg.php Handles transform settings, sanitization, and CSS output.
lib/​block-supports/​transform.php Registers attributes and renders block rotations.
docs/​reference-guides/​theme-json-reference/​theme-json-living.md Documents transform settings and styles.
docs/​reference-guides/​theme-json-reference/​styles-versions.md Records rotation version availability.
docs/​reference-guides/​core-blocks/​README.md Lists rotation support on opted-in blocks.
docs/​reference-guides/​block-api/​block-supports.md Documents the transform support contract.
docs/​how-to-guides/​themes/​global-settings-and-styles.md Adds rotation to the settings example.

Review effort: Balanced

Comment thread schemas/json/theme.json Resolved
@tellthemachines

Copy link
Copy Markdown
Contributor

Thanks for putting this together! I just did a quick round of testing and it's looking really good.

I'm not too sure about rotating only image/video without the captions, but I guess folks who want to rotate the whole block can always wrap it in a Group and rotate that instead:

Screenshot 2026-11-04 at 5 20 15 pm

This is also a great foundation to add a translate transform to, which can be used to place items anywhere on a grid without snapping them to the grid cells. So it does feel like a more solid solution than just the rotate support.

@aaronrobertshaw

Copy link
Copy Markdown
Contributor Author

Thanks for the early review @tellthemachines 🚀

I'm not too sure about rotating only image/video without the captions

Agreed. In part this helped test the block support with the selectors API and skipping serialization. Happy to allow it to go straight onto the wrapper.

This is also a great foundation to add a translate transform to

I have a draft up for this too actually. We should be able to polish and merge these pretty soon I'd say. That is, assuming we are all good with leaving Z axis translation to a follow up.

@tellthemachines

Copy link
Copy Markdown
Contributor

That is, assuming we are all good with leaving Z axis translation to a follow up.

Yeah I'm not sure we have any use for translateZ so definitely not worth adding now.

@tellthemachines tellthemachines mentioned this pull request Nov 4, 2026
4 of 36 tasks
@aaronrobertshaw
aaronrobertshaw force-pushed the add/transform-block-support branch from a49cb25 to 45793e8 Compare November 9, 2026 11:34
@aaronrobertshaw
aaronrobertshaw force-pushed the add/transform-block-support branch 2 times, most recently from acaae5c to 5132186 Compare November 11, 2026 07:42
@github-actions github-actions Bot added the [Package] Components /packages/components label Nov 11, 2026
@aaronrobertshaw
aaronrobertshaw changed the base branch from trunk to fix/angle-picker-control-range November 11, 2026 08:18
@aaronrobertshaw
aaronrobertshaw force-pushed the fix/angle-picker-control-range branch from 0a61beb to 0e3487f Compare November 12, 2026 02:08
@aaronrobertshaw

Copy link
Copy Markdown
Contributor Author

I've moved the Image block's adoption of the transform support into its own follow-up PR:

This keeps the scope of this PR on the transform support itself and only simple and straightforward adoptions of it.

Image is a bit more in depth and exposes more edge cases so a dedicated PR for it should help ease testing and iteration. I'm aiming to land it in the same Gutenberg release as this one.

An earlier iteration left this PR applying block instance styles via selectors but I've fixed that so it follows the pattern of other block supports again.

I'll address the recent feedback tomorrow. Appreciate all the continued help, testing and reviews here 🙇

@aaronrobertshaw

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews so far. I think this is ready for another round of testing.

Since the last round:

  • Viewport states start from the block's own rotation.
  • Block instance styles are saved inline, like normal.
  • The Image block's adoption of transform supports has been moved to its own PR, #86955.

The rough UX edges are being explored in follow-ups:

I don't think these need to block this PR. In the worst case we can revert the support.

If this gets approved, I'll hold off merging for a little while. I want to be confident the follow-ups get us most of the way first.

@tellthemachines tellthemachines left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates! This is looking pretty good now, let's get it in and iterate on the follow-ups.

Only the blocks from the original rotate PR opt in: Group, Heading, Image and Video. The :hover rotation tests now expect Button's root selector, and the e2e spec drops the Button hover test.
theme.json and Global Styles rotations rendered on the front end but not
in the post or site editor canvas, because STYLE_KEYS left out transform.
Also lists transform in the Global Styles change summary.
A fractional angle, such as 1rad shown as 57.3, failed the angle picker's
step and was rewritten as soon as the field lost focus.
PHP's $ matched before a final newline, so "45deg\n" passed in PHP but
not in JS.
Elements already forbid transform, but their :hover and other states
referenced the complete style properties, which now include it. The PHP
side strips it, so the schema now rejects it too.
The select and text input states still referenced the complete style properties, which include transform. Guard them the same way as the link and button states.
Trunk now requires new test files to be TypeScript.
The rotation now applies to the block wrapper instead of the image or video, so the caption turns with it. The lightbox resets the rotation on the enlarged figure, which copies the block's classes and inline styles.
A rotation turns the figure around its centre, which its bounding box keeps. The zoom now places the unrotated image from that centre and the image's layout offset, instead of from the larger rotated bounding box.
Transforms are for blocks only. Element styles in a block's style
attribute, including viewport states, passed their whole style object to
the style engine, so a saved or pasted element transform still output
CSS. Drop the transform key from element styles in the elements and
states supports and in the editor.
Tell translators that the Transform panel is about visual styles, such as rotate, move and scale, and not about transforming a block into another block.
Pair UnitControl and RangeControl in a small helper, UnitRangeControl, so Rotation accepts deg, turn, rad and grad. The value is stored as typed, with its unit, and the slider range and step follow the selected unit. A typed value may go beyond the slider range, and clearing the field removes the value.

This replaces the angle picker and its conversion to whole degrees.
Transforms now follow Border and Shadow. The rotation is saved inline on
the block wrapper through addSaveProps, dynamic blocks get it from an
apply callback, and a block that applies it to an inner element skips
serialization and calls getTransformClassesAndStyles() or
gutenberg_get_transform_classes_and_styles(). Feature selectors are left
to Global Styles and block style states.

Transform tools are now off by default and switched on by appearanceTools.
Global Styles validate transform values with one style engine call.

Image leaves the support to a follow-up, which applies transforms to its
img with the resize box and lightbox following.
When a viewport or pseudo state is selected, the Transform panel showed
only the Global Styles value for that state. The block's own rotation was
ignored, so a mobile rotation started from the wrong value.

The inherited value now layers the block styles the state renders over on
top of the resolved Global Styles value.
The transform tests now use Group for a block without a transform
selector and Button for a block with one, so they do not depend on the
Image block.
@aaronrobertshaw

Copy link
Copy Markdown
Contributor Author

Thanks for all the reviews, testing, discussion and help here.

I'll get this merged, rebase all the other transform supports and UX enhancements to get them rolling also.

@ramonjd

ramonjd commented Nov 22, 2026

Copy link
Copy Markdown
Member

Great work landing this one! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Block API API that allows to express the block paradigm. [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Package] Block editor /packages/block-editor [Package] Block library /packages/block-library [Package] Blocks /packages/blocks [Package] Style Engine /packages/style-engine [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants