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

feat: Make border of Radio thicker when hovering #1696

Merged
merged 12 commits into from
Nov 20, 2024
Merged
28 changes: 25 additions & 3 deletions packages/css/src/components/radio/radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@
}

.ams-radio__circle {
fill: none;
fill: var(--ams-radio-circle-fill);
stroke: var(--ams-radio-circle-stroke);
stroke-width: 0.125rem;
stroke-width: var(--ams-radio-circle-stroke-width);
}

.ams-radio__hover-indicator {
fill: none;
stroke: transparent;
stroke-width: var(--ams-radio-hover-indicator-stroke-width);
}

.ams-radio__checked-indicator {
Expand All @@ -56,6 +62,10 @@
stroke: var(--ams-radio-circle-hover-stroke);
}

.ams-radio__hover-indicator {
stroke: var(--ams-radio-hover-indicator-hover-stroke);
}

.ams-radio__checked-indicator {
fill: var(--ams-radio-checked-indicator-hover-fill);
}
Expand Down Expand Up @@ -108,9 +118,13 @@

// HOVER

// Disabled label hover
// Disabled hover
.ams-radio__input:disabled + .ams-radio__label:hover {
text-decoration: none;

.ams-radio__hover-indicator {
stroke: transparent;
}
}

// Invalid hover
Expand All @@ -120,6 +134,11 @@
stroke: var(--ams-radio-circle-invalid-hover-stroke);
}

.ams-radio__hover-indicator {
// TODO: this should be the (currently non-existent) dark red hover color
stroke: var(--ams-radio-hover-indicator-invalid-hover-stroke);
}

.ams-radio__checked-indicator {
// TODO: this should be the (currently non-existent) dark red hover color
fill: var(--ams-radio-checked-indicator-invalid-hover-fill);
Expand All @@ -133,6 +152,9 @@
stroke: var(--ams-radio-circle-disabled-invalid-hover-stroke);
}

.ams-radio__hover-indicator {
stroke: transparent;
}
.ams-radio__checked-indicator {
// TODO: currently disabled invalid gets the same styling as disabled. This should get its own styling.
fill: var(--ams-radio-checked-indicator-disabled-invalid-hover-fill);
Expand Down
6 changes: 5 additions & 1 deletion proprietary/assets/icons/Radio.svg
dlnr marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions proprietary/tokens/src/components/ams/radio.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,21 @@
}
}
},
"hover-indicator": {
"stroke-width": { "value": "3px" },
"hover": {
"stroke": { "value": "{ams.color.primary-blue}" }
},
"invalid": {
"hover": {
"stroke": { "value": "{ams.color.primary-red}" }
}
}
},
"circle": {
"fill": { "value": "{ams.color.primary-white}" },
"stroke": { "value": "{ams.color.primary-blue}" },
"stroke-width": { "value": "2px" },
"disabled": {
"stroke": { "value": "{ams.color.neutral-grey3}" }
},
Expand Down