Skip to content

Cannot apply wide or full widths to nested blocks with theme.json applied #33374

@pattyok

Description

@pattyok

Description

Trying out theme.json. When it is activated, the option to set wide/full width on a block placed inside a group disappears. This happens whether theme.json has any content in it or not. If remove theme.json, the option re-appears. I am working with my own custom theme, but I was able to reproduce with the TwentyTwentyOne theme as well.

Step-by-step reproduction instructions

  1. Set the theme to twenty-twenty one
  2. Add a group block, add a media-text, columns, group or cover block inside the group
  3. Notice the ability to set the width of each of those blocks to wide, full or normal
  4. Add a theme.json file to the theme (it doesnt seem to matter what is inside this theme file)

Expected behaviour

I still should be able to set the width of a block when it is nested.

Actual behaviour

I can't set the width of a block when it is nested. The align-wide and align-full options are not shown in the toolbar.

Screenshots or screen recording (optional)

Code snippet (optional)

This is the theme.json I am using - though editing it way down does not seem to make a difference.
https://gist.github.com/pattyok/0e7726a15c59ba8d183d2d1427728b48.js

WordPress information

  • WordPress version: 5.8-RC2
  • Gutenberg version: 11.0.0
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

Device information

  • Device: Desktop
  • Operating system: maxOS 11.3
  • Browser: Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions