|
1 | 1 | .has-float-label { |
| 2 | + display: block; |
2 | 3 | position: relative; } |
3 | | - .has-float-label label { |
| 4 | + .has-float-label label, .has-float-label > span { |
4 | 5 | position: absolute; |
5 | 6 | left: 0; |
6 | 7 | top: 0; |
|
13 | 14 | -webkit-appearance: none; |
14 | 15 | -moz-appearance: none; |
15 | 16 | appearance: none; } |
16 | | - .has-float-label .form-control { |
| 17 | + .has-float-label input, .has-float-label select { |
17 | 18 | font-size: inherit; |
18 | 19 | padding-top: 1em; |
19 | 20 | margin-bottom: 2px; |
20 | 21 | border: 0; |
21 | 22 | border-radius: 0; |
22 | | - background: transparent; |
23 | 23 | border-bottom: 2px solid rgba(0, 0, 0, 0.1); } |
24 | | - .has-float-label .form-control::-webkit-input-placeholder { |
| 24 | + .has-float-label input::-webkit-input-placeholder, .has-float-label select::-webkit-input-placeholder { |
25 | 25 | opacity: 1; |
26 | 26 | -webkit-transition: all .2s; |
27 | 27 | transition: all .2s; } |
28 | | - .has-float-label .form-control:placeholder-shown:not(:focus)::-webkit-input-placeholder { |
| 28 | + .has-float-label input:placeholder-shown:not(:focus)::-webkit-input-placeholder, .has-float-label select:placeholder-shown:not(:focus)::-webkit-input-placeholder { |
29 | 29 | opacity: 0; } |
30 | | - .has-float-label .form-control:placeholder-shown:not(:focus) + label { |
| 30 | + .has-float-label input:placeholder-shown:not(:focus) + *, .has-float-label select:placeholder-shown:not(:focus) + * { |
31 | 31 | font-size: 150%; |
32 | 32 | opacity: .5; |
33 | 33 | top: .25em; } |
34 | | - .has-float-label .form-control:focus { |
| 34 | + .has-float-label input:focus, .has-float-label select:focus { |
35 | 35 | outline: none; |
36 | 36 | border-color: rgba(0, 0, 0, 0.5); } |
37 | | - |
38 | | -.input-group .has-float-label { |
39 | | - display: inline-block; } |
| 37 | + .has-float-label select { |
| 38 | + padding-right: 1em; |
| 39 | + background: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.5em bottom 0.25em; |
| 40 | + background-size: 8px 10px; } |
0 commit comments