diff options
| author | Christian Oliff <[email protected]> | 2018-06-25 05:11:39 +0900 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2018-06-24 13:11:39 -0700 |
| commit | 41ab1c6c9d2599b3e32a8cee6091c40ba171fe47 (patch) | |
| tree | 47e9bfabae5587f1e95db1b1fc2ad7956a7890e1 | |
| parent | d78aac01d638a494e3e8aebe90df68382addb4c7 (diff) | |
| download | bootstrap-41ab1c6c9d2599b3e32a8cee6091c40ba171fe47.tar.xz bootstrap-41ab1c6c9d2599b3e32a8cee6091c40ba171fe47.zip | |
Fixes Edge and IE label overlapping issue (#25919)
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.
| -rw-r--r-- | docs/4.1/examples/floating-labels/floating-labels.css | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/4.1/examples/floating-labels/floating-labels.css b/docs/4.1/examples/floating-labels/floating-labels.css index 2c1d91bf3..a5634ab5f 100644 --- a/docs/4.1/examples/floating-labels/floating-labels.css +++ b/docs/4.1/examples/floating-labels/floating-labels.css @@ -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; + } +} |
