Make WordPress Core

Opened 12 months ago

Closed 11 months ago

Last modified 11 months ago

#58548 closed enhancement (fixed)

Update layout classnames and specificity

Reported by: isabel_brison's profile isabel_brison Owned by: isabel_brison's profile isabel_brison
Milestone: 6.3 Priority: normal
Severity: normal Version: 6.3
Component: Editor Keywords: gutenberg-merge has-patch has-unit-tests
Focuses: Cc:


This ticket tracks the changes to src/wp-includes/block-supports/layout.php, src/wp-includes/class-wp-theme-json.php and src/wp-includes/theme.json from the following Gutenberg PRs:

Because they touch the same parts of the same files and are conceptually close I think it makes sense to bring them in together.

Change History (5)

This ticket was mentioned in PR #4623 on WordPress/wordpress-develop by @isabel_brison.

12 months ago

  • Keywords has-patch has-unit-tests added

Trac ticket:

This PR backports the PHP changes from and

To test the changes, build PR branch locally. and make sure a block theme such as Twenty Twenty Three is enabled. Until the npm packages are updated, these changes will only be testable on the front end.

  • The compound classname should appear on all blocks with layout enabled, e.g. in TT3, the main element in the home template should have a wp-block-group-is-layout-constrained class, in addition to the previously existing classes.
  • Child blocks of flow and constrained layouts (such as the children of the above main element) should have the reduced specificity rules applied to them.

#2 @poena
12 months ago

I am sorry if this is a stupid question or remark, but in this PR, we are updating

theme.json > layout definitions > spacingStyles,

and in we are moving the layout definitions to block-supports/layout.php:

Last edited 12 months ago by poena (previous) (diff)

#3 @isabel_brison
12 months ago

Yes, in order to make these changesets easier to review, Andrew and I decided to add them incrementally. This change is older than the one in #58550; the plan is to get it committed first and then add #58550 on top.

#4 @isabel_brison
11 months ago

  • Owner set to isabel_brison
  • Resolution set to fixed
  • Status changed from new to closed

In 55956:

Editor: update layout classnames and specificity.

Adds a compound layout classname and reduces layout spacing rule specificity.

Props ramonopoly, andrewserong, poena.
Fixes #58548.

@isabel_brison commented on PR #4623:

11 months ago

Thanks for the reviews, folks!

Committed in r55956 / cfe8ab9.

Note: See TracTickets for help on using tickets.