Separator Block: Add top & bottom margin support #40551
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds top & bottom
margin
support to the separator block. There have been other attempts at this in the past, see #20758 #30609 #28451. They've been closed in favor of using the spacer block, but I don't think that's intuitive, especially as there are other blocks with margin controls.For example, if I want to add a spacer with 50px space on either side, I need to add a group block, set the block gap & margin top to
0px
(to account for added margins), and then add my spacers & separator.Or, I could just control the margin directly.
How?
This simply toggles the block support for
spacing.margin
, for top & bottom margin only (the minimum needed change).Testing Instructions
Screenshots
Added Dimension panel & margin control
Spacer with margin