]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
place feedback icon lower, only if it really need 14005/head
authorBoris Serdyuk <just-boris@yandex-team.ru>
Tue, 1 Jul 2014 15:15:00 +0000 (19:15 +0400)
committerjust-boris <just-boris@yandex-team.ru>
Tue, 1 Jul 2014 16:23:22 +0000 (20:23 +0400)
less/forms.less

index 2c5e9bfa931984deb26663a6d3cb3d8e383f879f..cb8add4b6e006a427663da16761cab3415e24ec7 100644 (file)
@@ -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;
+  }
 }