Skip to content

Conversation

@aaronrobertshaw
Copy link

@aaronrobertshaw aaronrobertshaw commented Dec 15, 2025

Warning

This PR depends on #10470 and #10474 and should be rebased and merged after them.

Trac ticket: https://core.trac.wordpress.org/ticket/64413

This PR brings the changes from the following Gutenberg PRs to core:

WordPress/gutenberg#73811

Description

Adds support for preset dimensions values to be defined within theme.json and used across block supports such as; width, min-height etc.

Testing

  1. Adopt width support on a block or use the Group block with min-height support
  2. Add dimensionSizes presets to your theme.json
  3. Add styles to your test blocks within your theme.json using both the presets and custom values

This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

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

Looking really good — looks like there's just one issue to fix up (I've left a comment), but when I updated the width object locally, everything tested well. Once that's sorted I think this will be good to land (and the preceding two PRs that this builds on).

Left a couple of tiny nits re: the tests, just if we should ensure we add both width and height in the test cases, rather than just using one of them. Not a blocker at all, though.

@ramonjd ramonjd force-pushed the add/presets-to-dimensions-supports branch from 8737c71 to 3ae54c3 Compare February 12, 2026 05:55
@ramonjd ramonjd marked this pull request as ready for review February 12, 2026 05:57
@github-actions
Copy link

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props aaronrobertshaw, ramonopoly, andrewserong.

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

@ramonjd
Copy link
Member

ramonjd commented Feb 12, 2026

I ran out of time to test this properly, sorry, but it's rebased and I addressed the feedback.

Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

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

This is re-testing nicely for me:

Site frontend:

Image

And in the editor:

Image

Just ignore my design choices 😄
LGTM! 🚀

aaronrobertshaw and others added 7 commits February 13, 2026 11:27
…presets

- Added height dimension preset to the style engine test cases.
- Updated expected CSS output to reflect the inclusion of height in the style engine configuration.
- Modified theme JSON tests to incorporate height dimension preset for consistency in styling.
@ramonjd ramonjd force-pushed the add/presets-to-dimensions-supports branch from 7a2c7a0 to a3d7918 Compare February 13, 2026 00:30
@ramonjd
Copy link
Member

ramonjd commented Feb 13, 2026

Committed in r61631 and d0a9538

@ramonjd ramonjd closed this Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants