-
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
Margin support for Paragraph blocks is desperately needed. #37299
Comments
I have wanted this for months now, and have had several scenarios in which I've had to handle margins with magic classes. Given how fundamental paragraphs are to publishing content, I would vote 100% to include support for margins. |
I agree with this proposal in broad terms: ideally any element that inherits the On a practical level, my worry is enabling block-level margins will encourage layouts that are neither truly responsive or device-agnostic. Conceptually, there's tension between My hope is this can be solved more elegantly than providing multiple ways to set a
|
Conceptually, I agree with everything you said @chthonic-ds. My argument for margin control is that there will always be designs that necessitate control beyond anything On the topic of |
What problem does this address?
Paragraph blocks are fundamental to the design of any website. As we move closer towards Full Site Editing, the need for full control over paragraph margins has become increasingly apparent. In fact, theme developers (myself included) are resorting to "magic classes" to zero out, or modify, margins on blocks. Allowing themes to opt-in to paragraph margin support will provide greater flexibility and decrease the reliance on custom CSS in the theme's stylesheet and/or crude "hacks".
As a side benefit, margin support works in tandem with
blockGap
. WithblockGap
enabled,margin-top
is added to every block. While this is great 90% of the time, there are instances where you would want to remove/modify this margin. Margin support for paragraphs enables this functionality. Again, no need for "magic classes" or alternative solutions.I have chosen to focus solely on the paragraph block in this issue and linked PR, but separate PRs will be created for other block types that equally need greater dimensions support.
What is your proposed solution?
#37300 Adds margin support to paragraphs. This would be an opt-in, so theme developers would need to add
settings.blocks.core/paragraph.spacing.margin.true
to theme.json or use the"appearanceTools": true
flag.The text was updated successfully, but these errors were encountered: