Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Columns block spacing doesn't work with 'disable-layout-styles' option #49782

Closed
BeholdPL opened this issue Apr 12, 2023 · 3 comments
Closed
Labels
[Block] Columns Affects the Columns Block Needs Testing Needs further testing to be confirmed. [Type] Bug An existing feature does not function as intended

Comments

@BeholdPL
Copy link

Description

While using add_theme_support( 'disable-layout-styles' ) option, block spacing doesn't applied for Columns block.
Screenshot 2023-04-13 at 01 34 11
Screenshot 2023-04-13 at 01 34 46

Step-by-step reproduction instructions

  1. Add add_theme_support( 'disable-layout-styles' ); to functions.php
  2. Add Columns block
  3. Try to change Block Spacing

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@Thelmachido Thelmachido added [Type] Bug An existing feature does not function as intended [Block] Columns Affects the Columns Block Needs Testing Needs further testing to be confirmed. labels Apr 13, 2023
@aaronrobertshaw
Copy link
Contributor

Thanks for taking the time to submit an issue @BeholdPL 👍

I believe this is actually intended behaviour. There were major changes to layout support in WordPress 6.1 and some of those changes impacted the disabling of layout styles.

In the linked breakdown of layout changes, it notes the following:

Note: Opting into this feature will remove required styles for blocks such as Group, Columns, Social icons and Buttons, so themes that use this feature will need to supply their own structural layout styles in order for these blocks to render correctly in the editor and on the site’s frontend.

The docs also flag that disabling layout styles will opt out of generated block layout styles for core blocks.

Themes can opt out of generated block layout styles that provide default structural styles for core blocks including Group, Columns, Buttons, and Social Icons. By using the following code, these themes commit to providing their own structural styling, as using this feature will result in core blocks displaying incorrectly in both the editor and site frontend:

I believe part of the problem here is that block gap is displayed under dimensions/spacing but is in part dependent upon layout support. There are ongoing discussions and proposals towards merging the layout and dimensions panels to better group related controls.

I hope that helps!

/cc @tellthemachines and @andrewserong just to confirm

@andrewserong
Copy link
Contributor

andrewserong commented Apr 17, 2023

Thanks for the ping!

I believe this is actually intended behaviour.

Yes, it's expected that core blocks that depend on the layout block support will fail when disable-layout-styles is in use, and that includes the block spacing. When using disable-layout-styles, you might also want to switch off any UI controls that are not applicable. disable-layout-styles was introduced primarily with classic themes, or themes that don't use the appearanceTools option in mind.

@ndiego
Copy link
Member

ndiego commented Apr 18, 2023

Since this is expected behavior, as detailed by the previous comments, I am going to close this issue out. Feel free to reopen as needed. Thanks!

@ndiego ndiego closed this as completed Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Columns Affects the Columns Block Needs Testing Needs further testing to be confirmed. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants