Skip to content

Commit

Permalink
place feedback icon lower, only if it really need
Browse files Browse the repository at this point in the history
  • Loading branch information
just-boris committed Jul 1, 2014
1 parent a013c11 commit 77c1a52
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions less/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}


Expand Down

0 comments on commit 77c1a52

Please sign in to comment.