diff options
| author | Boris Serdyuk <[email protected]> | 2014-07-01 19:15:00 +0400 |
|---|---|---|
| committer | just-boris <[email protected]> | 2014-07-01 20:23:22 +0400 |
| commit | 77c1a528ab48ba695f52f4f8f7b97bf7bbde05d1 (patch) | |
| tree | 9e42ad11afc28c5eba9acad4f913bfdbdfbf387a | |
| parent | a013c112c41e096a881de67cae76fbaeb88947ee (diff) | |
| download | bootstrap-77c1a528ab48ba695f52f4f8f7b97bf7bbde05d1.tar.xz bootstrap-77c1a528ab48ba695f52f4f8f7b97bf7bbde05d1.zip | |
place feedback icon lower, only if it really need
| -rw-r--r-- | less/forms.less | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/less/forms.less b/less/forms.less index 2c5e9bfa9..cb8add4b6 100644 --- a/less/forms.less +++ b/less/forms.less @@ -331,7 +331,7 @@ input[type="checkbox"] { // Feedback icon (requires .glyphicon classes) .form-control-feedback { position: absolute; - top: (@line-height-computed + 5); // Height of the `label` and its margin + top: 0; right: 0; z-index: 2; // Ensure icon is above input groups display: block; @@ -363,9 +363,14 @@ input[type="checkbox"] { } -// Reposition feedback icon if label is hidden with "screenreader only" state -.has-feedback label.sr-only ~ .form-control-feedback { - top: 0; +// Reposition feedback icon if input has visible label above +.has-feedback label { + & ~ .form-control-feedback { + top: (@line-height-computed + 5); // Height of the `label` and its margin + } + &.sr-only ~ .form-control-feedback { + top: 0; + } } |
