Closed deckar01 closed 8 years ago
Another reason this is inconsistent behavior is that using margin-top: 4px
is meant to vertically center the checkbox, but it relies on the height of the line not to change. If content in the list item causes the line height to increase the checkbox stays stuck to the top of the line. The default for list bullets is to stay vertically centered with the first line.
float: left
is required for browser compatibility. Closing until setting a checkbox's width is consistent across browsers and operating systems (looking at you OS X).
Currently the
float: left
style on the checkbox is required to force the trailing whitespace to collapse. Doing this also requires pushing the checkbox down withmargin-top: 4px
.Explicitly removing the space and not using
float: left
would prevent additional whitespace from being destroyed and provide more flexibility to custom CSS layouts.See https://gitlab.com/gitlab-org/gitlab-ce/issues/22466 for more background.