Skip to content

Commit 854d45d

Browse files
authored
Fixed alignment of checkboxes for optionList items (#2313)
1 parent 74a0e93 commit 854d45d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

UNRELEASED.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
1717

1818
### Bug fixes
1919

20+
- Add vertical adjustment to `OptionList` control items ([#1310](https://github.com/Shopify/polaris-react/pull/1310))
2021
- Fixed `actionGroups` to only render `MenuActions` when actions are provided in the `Page` ([#2266](https://github.com/Shopify/polaris-react/pull/2266))
2122
- Fixed `PositionedOverlay` incorrectly calculating `Topbar.UserMenu` `Popover` width ([#1692](https://github.com/Shopify/polaris-react/pull/1692))
2223
- Fixed `recolor-icon` Sass mixin to properly scope `$secondary-color` to the child `svg` ([#2298](https://github.com/Shopify/polaris-react/pull/2298))

src/components/Choice/Choice.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $control-size: rem(16px);
44

55
// Need to push the control down just a little to have it appear
66
// vertically centered with the label.
7-
$control-vertical-adjustment: 2px;
7+
$control-vertical-adjustment: rem(2px);
88

99
.Choice {
1010
display: inline-flex;

src/components/OptionList/components/Option/Option.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
$min-height: control-height();
44
$control-size: rem(16px);
5+
$control-vertical-adjustment: rem(2px);
56

67
.Option {
78
@include unstyled-button;
@@ -32,7 +33,7 @@ $control-size: rem(16px);
3233
.Label,
3334
.SingleSelectOption {
3435
display: flex;
35-
align-items: center;
36+
align-items: flex-start;
3637
width: 100%;
3738
padding: spacing(tight) spacing();
3839
}
@@ -43,6 +44,7 @@ $control-size: rem(16px);
4344
flex-shrink: 0;
4445
width: $control-size;
4546
height: $control-size;
47+
margin-top: $control-vertical-adjustment;
4648
margin-right: spacing(tight);
4749
}
4850

0 commit comments

Comments
 (0)