1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

place feedback icon lower, only if it really need

This commit is contained in:
Boris Serdyuk 2014-07-01 19:15:00 +04:00 committed by just-boris
parent a013c112c4
commit 77c1a528ab

View file

@ -331,7 +331,7 @@ input[type="checkbox"] {
// Feedback icon (requires .glyphicon classes) // Feedback icon (requires .glyphicon classes)
.form-control-feedback { .form-control-feedback {
position: absolute; position: absolute;
top: (@line-height-computed + 5); // Height of the `label` and its margin top: 0;
right: 0; right: 0;
z-index: 2; // Ensure icon is above input groups z-index: 2; // Ensure icon is above input groups
display: block; display: block;
@ -363,9 +363,14 @@ input[type="checkbox"] {
} }
// Reposition feedback icon if label is hidden with "screenreader only" state // Reposition feedback icon if input has visible label above
.has-feedback label.sr-only ~ .form-control-feedback { .has-feedback label {
top: 0; & ~ .form-control-feedback {
top: (@line-height-computed + 5); // Height of the `label` and its margin
}
&.sr-only ~ .form-control-feedback {
top: 0;
}
} }