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

Details Block: Add layout support and opt-in to spacing.blockGap #53252

Closed
andrewserong opened this issue Aug 2, 2023 · 4 comments · Fixed by #53282
Closed

Details Block: Add layout support and opt-in to spacing.blockGap #53252

andrewserong opened this issue Aug 2, 2023 · 4 comments · Fixed by #53282
Assignees
Labels
[Block] Details Affects the Details Block - used to display content which can be shown/hidden [Feature] Layout Layout block support, its UI controls, and style output. [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@andrewserong
Copy link
Contributor

andrewserong commented Aug 2, 2023

What problem does this address?

As suggested in #53155, some folks working on themes would like to add the ability to control block spacing in the new Details block. In order to do that, we will likely need to add layout support to the Details block.

Related issues:

What is your proposed solution?

  • Look into opting the Details block in to the layout block support.
  • In the process, replace the hard-coded styling rules for the Details block that currently depend on the root block gap CSS var (--wp--style--block-gap).
  • Factor in how should spacing between the summary and other blocks within details work? (spacing between the summary and inner blocks).
  • Opt-in to spacing.blockGap so that block spacing can be controlled at the individual block level.
@andrewserong andrewserong added [Type] Enhancement A suggestion for improvement. [Feature] Layout Layout block support, its UI controls, and style output. [Block] Details Affects the Details Block - used to display content which can be shown/hidden labels Aug 2, 2023
@webmandesign
Copy link
Contributor

webmandesign commented Aug 2, 2023

Not sure if it's beneficial, but maybe core/post-author-biography block could get blockGap support too?
(as per your comment and my comment)

@tellthemachines
Copy link
Contributor

I'm thinking maybe just give it flow layout? Or would there be any value to allowing constrained too?

@andrewserong
Copy link
Contributor Author

I'm thinking maybe just give it flow layout? Or would there be any value to allowing constrained too?

👍 I reckon just flow layout would be a good place to start, and I imagine that would cover most use cases since it's likely that details will be added within post content or somewhere else that's already within a constrained layout.

@tellthemachines
Copy link
Contributor

Did a quick PR to see how it works: #53282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Details Affects the Details Block - used to display content which can be shown/hidden [Feature] Layout Layout block support, its UI controls, and style output. [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants