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

Flex property missing after update WP 6.2 #5

Closed
roelmagdaleno opened this issue Apr 9, 2023 · 2 comments
Closed

Flex property missing after update WP 6.2 #5

roelmagdaleno opened this issue Apr 9, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@roelmagdaleno
Copy link
Owner

Related to this issue WP 6.2 Update destroys flex-layouts in custom blocks (blockGap and align-items:center) #49502.

We can read the columns and social links block's code to see how WP Core does it.

@roelmagdaleno roelmagdaleno added the bug Something isn't working label Apr 9, 2023
@roelmagdaleno roelmagdaleno self-assigned this Apr 9, 2023
@roelmagdaleno
Copy link
Owner Author

I discovered if the div that contains the inner blocks has a class then the layout classes will append to that div. So, remove the className, update the block and works again.

<div style={ { gap: gapValue } }>
   { innerBlocksProps.children }
</div>

@roelmagdaleno
Copy link
Owner Author

The blockGap setting didn't work properly, so I checked how the Group block is working and inside the block.json file the blockGap property is true instead of horizontal or vertical. It does the same within __experimentalDefaultControls setting.

Now the spacing property looks like this:

"spacing": {
	"margin": true,
	"padding": true,
	"blockGap": true,
	"__experimentalDefaultControls": {
		"padding": true,
		"blockGap": true
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant