-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Make border of Radio thicker when hovering #1696
Conversation
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.
LGTM, slightly off position is acceptable imo.
I think this looks a little weird, especially since all components with border width changes on hover currently grow to the inside only. I left this hover effect out because it looks weird with a checked radio, that hasn't been designed yet I think. Seeing as a Radio always has a label, and that has a very obvious underline on hover, maybe we don't need a hover effect on the radio icon at all? We should probably align that with the Checkbox though. |
The hover effect has been changed. This required redrawing the icon. |
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.
The hover border now appears inside the radio. Is that supposed to happen?
Yes, the PR description says so: “The hover indicator is implemented as a separate circle to ensure it thickens to the inside only.” All our borders thicken to the inside: Checkbox, Link, Input. |
# Conflicts: # proprietary/tokens/src/components/ams/radio.tokens.json
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.
The only thing I think is left is a size reduction in the compact theme. We can do this in another PR.
Describe the pull request
What
This makes the stroke of the circle of a Radio button a bit thicker when hovering over it.
Why
Because it has been designed as such.
How
The hover indicator is implemented as a separate circle to ensure it thickens to the inside only. Increasing the stroke width of one circle makes it grow to both the inside and outside.
I’ve added a token to make the background of the icon explicitly white – or else a background would shine through.
I’ve also changed the values to use pixels instead of rems to prevent the border from becoming overly thick when the text size is increased.
Checklist
Before submitting your pull request, please ensure you have done the following. Check each checkmark if you have done so or if it wasn't necessary:
Additional notes
–