Repository navigation
Separator Block: Add top & bottom margin support - #40551
Merged
Merged
Conversation
ryelle
requested review from
ajitbohra,
juanmaguitar,
mkaz and
ryanwelcher
as code owners
April 22, 2022 16:32
carolinan
approved these changes
Apr 25, 2022
|
In the following use case |
8 tasks
|
Discovered what appears to be a bug on this here: #47059 the global margin is not working when set via global styles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
marginsupport 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
