]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix input group z-index focus + validation
authorFlorian Lacreuse <lacreuse.florian@gmail.com>
Wed, 31 Aug 2022 14:17:58 +0000 (16:17 +0200)
committerMark Otto <otto@github.com>
Thu, 1 Sep 2022 01:17:41 +0000 (18:17 -0700)
scss/forms/_input-group.scss
scss/mixins/_forms.scss

index 813679f0cc7ee7ca70488322e8870cb98fe1a71a..247f74a7ac500137db2c666985beecbd404e18a6 100644 (file)
@@ -22,7 +22,7 @@
   > .form-control:focus,
   > .form-select:focus,
   > .form-floating:focus-within {
-    z-index: 3;
+    z-index: 5;
   }
 
   // Ensure buttons are always above inputs for more visually pleasing borders.
@@ -33,7 +33,7 @@
     z-index: 2;
 
     &:focus {
-      z-index: 3;
+      z-index: 5;
     }
   }
 }
index 81cd2e3ac4e372ed4de15fb7913d892c9e1a4d19..2a853a789451bf7493e54fb6bd425a832f622bc4 100644 (file)
     }
   }
 
-  .input-group .form-control,
-  .input-group .form-select {
-    @include form-validation-state-selector($state) {
-      @if $state == "valid" {
-        z-index: 1;
-      } @else if $state == "invalid" {
-        z-index: 2;
-      }
-      &:focus {
-        z-index: 3;
+  .input-group {
+    > .form-control:not(:focus),
+    > .form-select:not(:focus),
+    > .form-floating:not(:focus-within) {
+      @include form-validation-state-selector($state) {
+        @if $state == "valid" {
+          z-index: 3;
+        } @else if $state == "invalid" {
+          z-index: 4;
+        }
       }
     }
   }