-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Allow Group blocks to transform into Cover blocks #30445
Comments
You can't transform a Cover block into a Group block, only wrap a group block around the Cover block (This is possible for every block). You can use If we add the ungroup option to the transfer dropdown, we should build for all blocks, not just for the cover block. |
I personally can't find much value in this transform, as Even that would need more changes since the Reference: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-transforms/#block |
I'm not sure if it's better for me to reply here or in the PR. It's worth noting that this does not require user input if there is an existing background of some sort, but I hear you. I thought about adding something to migrate an image from |
Perhaps we only make this available for Group Blocks that have a solid color background set? Then there's a clear 1:1 cover block equivalent to transition to. (Once #14744 is resolved, there should be more possibilities here too). |
Handling Also I'm not aware if we can extract the theme's main background color programmatically to set as |
Yeah, I'm not sure that we can. Though it might get easier to do that if the theme's defined a background via theme.json. |
Updated the PR to only offer transformation to cover when a background color or gradient is available in the Group block. |
It's currently possible to transform a Cover block into a group block, but not the other way around. It would be great to add that option in.
The text was updated successfully, but these errors were encountered: