BorderControl: Fix vertical alignment of inner slider control#39750
Merged
Conversation
andrewserong
approved these changes
Mar 28, 2022
andrewserong
left a comment
Contributor
There was a problem hiding this comment.
LGTM!
✅ Confirmed that in the Storybook version of the component there's no apparent difference
✅ Confirmed that in real-world usage in #37770 this is required to switch the element from being inline-flex to being flex to vertically centre the component in the available space
Sounds like a good place to put it to me, to ensure that the slider in this context is positioned correctly 👍
| Before | After |
|---|---|
![]() |
![]() |
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.


What?
Improve the styling of the
BorderControlto ensure the inner slider control is more reliably vertically aligned to the center out of the box.Why?
This change is being made to the component itself so there is less that any consumer may need to tweak for everything to be neatly aligned in their UI.
How?
Adds back the
display: flexrule that the component originally used to solve this alignment (#37769 (comment))Testing Instructions
npm run storybook:devBorderControlis still vertically aligned to the center.BorderBoxControl's linked view.Screenshots or screencast
Screenshots below are from #37770 and the block editor.