From 9c320df6529e27a0fe358fdaf18adc02d36d1ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Poupard?= Date: Wed, 24 Jun 2020 13:11:20 +0200 Subject: [PATCH] Floating labels improvements (#30966) * docs(example): floating-labels' better Edge fallback * docs(example): refactor floating-labels' CSS --- .../floating-labels/floating-labels.css | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/site/content/docs/5.0/examples/floating-labels/floating-labels.css b/site/content/docs/5.0/examples/floating-labels/floating-labels.css index 30daef63ee..9092659d06 100644 --- a/site/content/docs/5.0/examples/floating-labels/floating-labels.css +++ b/site/content/docs/5.0/examples/floating-labels/floating-labels.css @@ -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; }