-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Alignment available for all inner blocks #49580
Comments
The ability to choose an alignment on more blocks (such as a heading block, even when not nested) is an enhancement. :) Could you be able to clarify what sort of configuration documentation you're looking for? Are you looking for guidance on how to remove alignment options on specific blocks, or all inner blocks, for example? |
Sorry, my description was perhaps a little too brief... Since inner blocks previously could not have their alignment changed, but they can now, it appears that something has changed. So I'm wondering if it's possible to go back to the old functionality - with no alignment options for inner blocks - either for all inner blocks or just some inner blocks, depending on what's possible. So, basically I'm wondering if its possible to disable alignment settings for some or all inner blocks and if there is some documentation that describes this change and how this functionality can be configured. More options when it comes to block styling is of course a good thing, but in some cases I would really prefer to not have alignment options for inner blocks. I've tried to Google this and have found some vague info about adding a layout parameter to the useInnerBlocksProps hook, but have found no documentation on how this actually works, so either the documentation has not been updated to reflect this change or the possible solution to this issue lies elsewhere. |
I think it is related to this pull request #47477 |
Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks. |
Nothing changed regarding which blocks receive alignment settings; that has to be configured on the block itself. E.g. Heading by default supports wide and full alignments. What did change, as @carolinan pointed out, is that the container block layout configuration is now passed by default to its inner blocks. The consequence is that if your container block supports There's no way to fully disable alignment for all inner blocks of a container; even if the container doesn't support layout it's still possible for some blocks (such as Image) to align left or right. You could potentially leverage the Hope this helps! |
Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks. |
I'm going to go ahead and close this as there is nothing actionable here. Please feel free to reopen if needed! |
Description
I don't know if I'm only imagining this or not, but previously I could not set alignment on any inner blocks in any of my custom blocks, which is exactly what I wanted, since it risked interfering with the styling of the parent block.
Now, however, alignment can be set for all inner blocks in my custom blocks.
Has this functionality changed recently and is there any documentation on how to configure it?
Step-by-step reproduction instructions
The text was updated successfully, but these errors were encountered: