-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Checkable Button, Button and ButtonGroup, BulkAction] apply design language #2684
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
Conversation
ef3516c
to
e46a4e8
Compare
documentation/Color system.md
Outdated
|`--p-non-null-content`|`''`| | ||
|`--p-choice-size`|`2rem`| | ||
|`--p-choice-margin`|`0.1rem`| | ||
|`--p-control-border-width`|`0.2rem`| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this entire file changed but this is what actually changed
} | ||
> :first-child .Button { | ||
> :first-child .Button, | ||
> :first-child .Button::after { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy peasy. I didn't bother adding the .globalTheming here because this doesn't impact the non-themable buttons.
} | ||
|
||
&:focus { | ||
box-shadow: 0 0 0 1px currentColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actual bug fix for outline monochrome focus.
@@ -1,5 +1,4 @@ | |||
@import '../../styles/common'; | |||
$control-size: rem(16px); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wasn't being used 🤷♂
} | ||
|
||
.RadioButton.globalTheming { | ||
--control-border-width: #{rem(2px)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved this to tokens since it was was in 2 places
// padding to fix the bottom of letters being cutoff by overflow: hidden | ||
padding: rem(1px) 0; | ||
.globalTheming & { | ||
margin-left: calc(#{$chekbox-label-margin} - var(--p-control-border-width)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was causing the checkbox to be misaligned
e761a84
to
7a5297d
Compare
61df2ce
to
e5ea832
Compare
e5ea832
to
f26b0d7
Compare
f26b0d7
to
fe6031a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
WHY are these changes introduced?
Touches on:
https://github.com/Shopify/polaris-ux/issues/371
https://github.com/Shopify/polaris-ux/issues/382
https://github.com/Shopify/polaris-ux/issues/361
WHAT is this pull request doing?
For Button this fixes the focus state of outline monochrome buttons (Not .globalTheming hence the change log entry)

For Split Button this fixes the focus ring

For Checkable Button this fixes the alignment of the checkbox which was off by a few pixels

For ButtonGroup and BulkActions this fixes the focus ring

How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
🎩 checklist
README.md
with documentation changes