Skip to content
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

Align RadioButton styles with mobile #11840

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/selfish-oranges-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': minor
---

Updated `RadioButton` styles to improve mobile consistency
17 changes: 12 additions & 5 deletions polaris-react/src/components/RadioButton/RadioButton.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.RadioButton {
position: relative;
margin: var(--p-space-025);

@media (--p-breakpoints-md-up) {
margin: var(--p-space-025);
}
}

/* stylelint-disable selector-max-specificity, selector-max-class, selector-max-combinators -- code is much more readable this way */
Expand Down Expand Up @@ -97,25 +100,29 @@

.Backdrop {
/* stylelint-disable-next-line -- Polaris component custom properties */
--pc-icon-size-small: 8px;
--pc-icon-size-small: 10px;

/* ::before is the selected dot, ::after the focus-ring */

@media (--p-breakpoints-md-down) {
@media (--p-breakpoints-md-up) {
/* stylelint-disable-next-line -- Polaris component custom properties */
--pc-icon-size-small: 10px;
--pc-icon-size-small: 8px;
}
position: relative;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
border: var(--p-border-width-0165) solid var(--p-color-input-border);
border: var(--p-border-width-025) solid var(--p-color-input-border);
lgriffee marked this conversation as resolved.
Show resolved Hide resolved
border-radius: var(--p-border-radius-full);
background-color: var(--p-color-input-bg-surface);
transition: border-color var(--p-motion-duration-100) var(--p-motion-ease-out);

@media (--p-breakpoints-md-up) {
border: var(--p-border-width-0165) solid var(--p-color-input-border);
}

&::before {
content: '';
position: absolute;
Expand Down
Loading