]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Floating labels improvements (#30966)
authorGaël Poupard <ffoodd@users.noreply.github.com>
Wed, 24 Jun 2020 11:11:20 +0000 (13:11 +0200)
committerGitHub <noreply@github.com>
Wed, 24 Jun 2020 11:11:20 +0000 (14:11 +0300)
* docs(example): floating-labels' better Edge fallback

* docs(example): refactor floating-labels' CSS

site/content/docs/5.0/examples/floating-labels/floating-labels.css

index 30daef63eeb3362bfe257fe981251d3d74cc0e02..9092659d06327f830c86e73ba715cdea1fda2f49 100644 (file)
@@ -23,13 +23,13 @@ body {
   margin-bottom: 1rem;
 }
 
-.form-label-group input,
-.form-label-group label {
+.form-label-group input,
+.form-label-group label {
   height: 3.125rem;
   padding: .75rem;
 }
 
-.form-label-group label {
+.form-label-group label {
   position: absolute;
   top: 0;
   left: 0;
@@ -47,11 +47,11 @@ body {
   color: transparent;
 }
 
-.form-label-group input::-ms-input-placeholder {
+.form-label-group input::-moz-placeholder {
   color: transparent;
 }
 
-.form-label-group input::-moz-placeholder {
+.form-label-group input::-ms-input-placeholder {
   color: transparent;
 }
 
@@ -86,9 +86,15 @@ body {
 /* Fallback for Edge
 -------------------------------------------------- */
 @supports (-ms-ime-align: auto) {
-  .form-label-group > label {
-    display: none;
+  .form-label-group {
+    display: flex;
+    flex-direction: column-reverse;
   }
+
+  .form-label-group label {
+    position: static;
+  }
+
   .form-label-group input::-ms-input-placeholder {
     color: #777;
   }