|
17 | 17 | -moz-appearance: none;
|
18 | 18 | appearance: none;
|
19 | 19 | }
|
20 |
| -.has-float-label input, .has-float-label select { |
| 20 | +.has-float-label textarea { |
| 21 | + width: 100%; |
| 22 | +} |
| 23 | +.has-float-label input, .has-float-label select, .has-float-label textarea { |
21 | 24 | font-size: inherit;
|
22 | 25 | padding-top: 1em;
|
23 | 26 | margin-bottom: 2px;
|
24 | 27 | border: 0;
|
25 | 28 | border-radius: 0;
|
26 | 29 | border-bottom: 2px solid rgba(0, 0, 0, 0.1);
|
27 | 30 | }
|
28 |
| -.has-float-label input::-webkit-input-placeholder, .has-float-label select::-webkit-input-placeholder { |
| 31 | +.has-float-label input::-webkit-input-placeholder, .has-float-label select::-webkit-input-placeholder, .has-float-label textarea::-webkit-input-placeholder { |
29 | 32 | opacity: 1;
|
30 | 33 | -webkit-transition: all .2s;
|
31 | 34 | transition: all .2s;
|
32 | 35 | }
|
33 |
| -.has-float-label input:placeholder-shown:not(:focus)::-webkit-input-placeholder, .has-float-label select:placeholder-shown:not(:focus)::-webkit-input-placeholder { |
| 36 | +.has-float-label input::-moz-placeholder, .has-float-label select::-moz-placeholder, .has-float-label textarea::-moz-placeholder { |
| 37 | + opacity: 1; |
| 38 | + transition: all .2s; |
| 39 | +} |
| 40 | +.has-float-label input:-ms-input-placeholder, .has-float-label select:-ms-input-placeholder, .has-float-label textarea:-ms-input-placeholder { |
| 41 | + opacity: 1; |
| 42 | + transition: all .2s; |
| 43 | +} |
| 44 | +.has-float-label input::placeholder, .has-float-label select::placeholder, .has-float-label textarea::placeholder { |
| 45 | + opacity: 1; |
| 46 | + -webkit-transition: all .2s; |
| 47 | + transition: all .2s; |
| 48 | +} |
| 49 | +.has-float-label input:placeholder-shown:not(:focus)::-webkit-input-placeholder, .has-float-label select:placeholder-shown:not(:focus)::-webkit-input-placeholder, .has-float-label textarea:placeholder-shown:not(:focus)::-webkit-input-placeholder { |
| 50 | + opacity: 0; |
| 51 | +} |
| 52 | +.has-float-label input:placeholder-shown:not(:focus)::-moz-placeholder, .has-float-label select:placeholder-shown:not(:focus)::-moz-placeholder, .has-float-label textarea:placeholder-shown:not(:focus)::-moz-placeholder { |
| 53 | + opacity: 0; |
| 54 | +} |
| 55 | +.has-float-label input:placeholder-shown:not(:focus):-ms-input-placeholder, .has-float-label select:placeholder-shown:not(:focus):-ms-input-placeholder, .has-float-label textarea:placeholder-shown:not(:focus):-ms-input-placeholder { |
| 56 | + opacity: 0; |
| 57 | +} |
| 58 | +.has-float-label input:placeholder-shown:not(:focus)::placeholder, .has-float-label select:placeholder-shown:not(:focus)::placeholder, .has-float-label textarea:placeholder-shown:not(:focus)::placeholder { |
34 | 59 | opacity: 0;
|
35 | 60 | }
|
36 |
| -.has-float-label input:placeholder-shown:not(:focus) + *, .has-float-label select:placeholder-shown:not(:focus) + * { |
| 61 | +.has-float-label input:placeholder-shown:not(:focus) + *, .has-float-label select:placeholder-shown:not(:focus) + *, .has-float-label textarea:placeholder-shown:not(:focus) + * { |
37 | 62 | font-size: 150%;
|
38 | 63 | opacity: .5;
|
39 | 64 | top: .25em;
|
40 | 65 | }
|
41 |
| -.has-float-label input:focus, .has-float-label select:focus { |
| 66 | +.has-float-label input:focus, .has-float-label select:focus, .has-float-label textarea:focus { |
42 | 67 | outline: none;
|
43 | 68 | border-color: rgba(0, 0, 0, 0.5);
|
44 | 69 | }
|
|
0 commit comments