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
[Radio][Joy] Use precise dimensions for radio icon #35548
Conversation
|
b24d11f
to
db383d2
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.
👍 Nice catch!
There are still issues with this: This is the "Basic usage" demo from the documentation page in this pull request. The dimensions of the RadioIcon are 9.5x9.5 according to Edge, but it doesn't appear as such. At 100% scaling, these values are rounded to 10 pixels wide and 9 pixels tall. The current height calculation only switches one rounding error out for another. I'm also not sure why the border is considered like this. The border width only gives the width of a single border and not the border at both sides (horizontal or vertical), so at some point, the border can overlap with the RadioIcon, which I assume its inclusion is trying to prevent in the first place. Adding a |
Closes #35531
Closes #34167
Problem:
variant="outlined"
, radio icon isn't precisely centered due to the border of radio element.Solution:
Preview: https://deploy-preview-35548--material-ui.netlify.app/joy-ui/react-radio-button/
P.S. Argos changes are expected.