-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix(radio): add height and vertical-align #4978
Conversation
Add height and vertical-align to radio buttons so that radio buttons in list actions align correctly with the content. The added styles are already present in the checkbox component which does not have this issue.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
I'm not seeing any changes in the jsfiddle from what we currently have. Even by applying the changes requested. Can you please provide an actual reproduction case for the problem you are seeing that this addresses? I'm also not seeing any alignment problems in Chrome. Is this related to another engine? |
Sorry, just noticed the fiddle link is incorrect... |
So this seems to be OS-specific: Displays properly on Chrome V57 (Dev Channel) on Linux. I'll leave this to @sgomes to take a peek at on the Mac-side to see if he can reproduce it there in the fiddle. If he can and the proposed changes fixes it then it LGTM since applying them on Linux doesn't cause a problem here. |
Thanks for checking it out! 👍 |
It's misaligned on Chrome V55 for Windows as well. |
@maximiliankukla Could you do a quick check if my changes fix the issue for you? |
I can see the misalignment on the jsfiddle as well, and the fix doesn't seem to introduce any issues. Thanks, @pndewit! Merging this in. |
No problem, happy to help! Thanks for resolving the PR so quickly!
|
Add height and vertical-align to radio buttons so that radio buttons in list actions align correctly with the content. The added styles are already present in the checkbox component which does not have this issue.
Fiddle: https://jsfiddle.net/xuvryLyg/1/
This example is from the documentation: https://getmdl.io/components/index.html#lists-section
Merging this request would also mean a change to the above linked documentation page. Adding the following fix mentioned in that documentation would align the field incorrectly again:
EDIT: So the piece of CSS above should just be removed from the documentation. The
display: inline-block
(which is on the radio button component by default) should give the correct result.Let me know what you think or if I missed something.