]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fixes Edge and IE label overlapping issue (#25919)
authorChristian Oliff <christianoliff@yahoo.com>
Sun, 24 Jun 2018 20:11:39 +0000 (05:11 +0900)
committerMark Otto <otto@github.com>
Sun, 24 Jun 2018 20:11:39 +0000 (13:11 -0700)
The 'Floating labels' example is only supported on Chrome, Safari and Firefox. On Edge and IE the label is displayed always and any text input overlaps the label which makes it unreadable.

The fix here targets Edge and IE and makes the form behave normally, the labels are hidden and the placeholder color is standard.

docs/4.1/examples/floating-labels/floating-labels.css

index 2c1d91bf36ada55210a5290c05132bbcdf8e7209..a5634ab5f466fcfe80f01b4d47ce2d9a98ae669f 100644 (file)
@@ -80,3 +80,25 @@ body {
   font-size: 12px;
   color: #777;
 }
+
+/* Fallback for Edge
+-------------------------------------------------- */
+@supports (-ms-ime-align: auto) {
+  .form-label-group > label {
+    display: none;
+  }
+  .form-label-group input::-ms-input-placeholder {
+    color: #777;
+  }
+}
+
+/* Fallback for IE
+-------------------------------------------------- */
+@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
+  .form-label-group > label {
+    display: none;
+  }
+  .form-label-group input:-ms-input-placeholder {
+    color: #777;
+  }
+}