mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-11 16:14:04 +02:00
Floating labels improvements (#30966)
* docs(example): floating-labels' better Edge fallback * docs(example): refactor floating-labels' CSS
This commit is contained in:
@@ -23,13 +23,13 @@ body {
|
|||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-label-group > input,
|
.form-label-group input,
|
||||||
.form-label-group > label {
|
.form-label-group label {
|
||||||
height: 3.125rem;
|
height: 3.125rem;
|
||||||
padding: .75rem;
|
padding: .75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-label-group > label {
|
.form-label-group label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -47,11 +47,11 @@ body {
|
|||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-label-group input::-ms-input-placeholder {
|
.form-label-group input::-moz-placeholder {
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-label-group input::-moz-placeholder {
|
.form-label-group input::-ms-input-placeholder {
|
||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,9 +86,15 @@ body {
|
|||||||
/* Fallback for Edge
|
/* Fallback for Edge
|
||||||
-------------------------------------------------- */
|
-------------------------------------------------- */
|
||||||
@supports (-ms-ime-align: auto) {
|
@supports (-ms-ime-align: auto) {
|
||||||
.form-label-group > label {
|
.form-label-group {
|
||||||
display: none;
|
display: flex;
|
||||||
|
flex-direction: column-reverse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-label-group label {
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
|
||||||
.form-label-group input::-ms-input-placeholder {
|
.form-label-group input::-ms-input-placeholder {
|
||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user