diff options
| author | Mark Otto <[email protected]> | 2015-04-29 12:01:57 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2015-04-29 12:01:57 -0700 |
| commit | d31ec3390813d06e7df6f45b7459ce0e71a62937 (patch) | |
| tree | aeb7e3f28a2dd7131d18742254dc38ee1a77b74a | |
| parent | ed89be1f44500022fc67e334e6f245d2368eefc6 (diff) | |
| download | bootstrap-d31ec3390813d06e7df6f45b7459ce0e71a62937.tar.xz bootstrap-d31ec3390813d06e7df6f45b7459ce0e71a62937.zip | |
Fix no-label checkboxes/radios
Because we use `position: absolute` on our inputs, when there’s no
label the `.checkbox` ends up having no computed height. To avoid
rendering errors when there’s no label text, we reset the `position` to
`static` for normal rendering.
| -rw-r--r-- | scss/_forms.scss | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scss/_forms.scss b/scss/_forms.scss index 671be46fb..78ca70295 100644 --- a/scss/_forms.scss +++ b/scss/_forms.scss @@ -179,12 +179,15 @@ margin-bottom: ($spacer * .75); label { - // Ensure the input doesn't jump when there is no text - min-height: $line-height-computed; padding-left: 1.25rem; margin-bottom: 0; font-weight: normal; cursor: pointer; + + // When there's no labels, don't position the input. + input:only-child { + position: static; + } } } .radio input[type="radio"], |
