Material-ui: Align checkbox icons

Created on 11 May 2016  路  4Comments  路  Source: mui-org/material-ui

Problem description

The problem is when the label have 2 lines the icon is not correctly centered.

This are the html of the checkbox

We solve with adding alignItems: 'center' to the parent of the icon + label, please add a fix or a possibility to put a value for the align items.

Versions

  • Material-UI: "0.15.0-alpha.2"
  • React: "0.14.8
  • Browser: Chrome Versi贸n 50.0.2661.94

Most helpful comment

I mentioned to @tintin1343 that while the spec doesn't say anything specifically about checkbox alignment to multi-line text, and has no examples that I could find, the general rule does seem to be that icons are vertically centered relative to the text they accompany, so could apply here. There's no right or wrong though.

All 4 comments

I am very sure of this. I think this looks just fine, may be I am wrong. The spec clearly does not mention anything. I would like the other collaborators to respond to this.

@callemall/material-ui : Guys, would like you opinion about this. Thanks!

@tintin1343 Well, if the spec doesn't mention anything, I would just keep it like it. That looks good, but my point of view is subjective.

I mentioned to @tintin1343 that while the spec doesn't say anything specifically about checkbox alignment to multi-line text, and has no examples that I could find, the general rule does seem to be that icons are vertically centered relative to the text they accompany, so could apply here. There's no right or wrong though.

@tintin1343 You think this issue can be closed then?

Was this page helpful?
0 / 5 - 0 ratings