Skip to content

Commit

Permalink
Floating labels improvements (#30966)
Browse files Browse the repository at this point in the history
* docs(example): floating-labels' better Edge fallback

* docs(example): refactor floating-labels' CSS
  • Loading branch information
ffoodd committed Jun 24, 2020
1 parent 02ff387 commit 9c320df
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions site/content/docs/5.0/examples/floating-labels/floating-labels.css
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 9c320df

Please sign in to comment.