1
1
/*
2
- pure-css-float-labels v1.4
2
+ pure-css-float-labels v1.5
3
3
by Adam Culpepper | @adamculpepper
4
4
https://github.com/adamculpepper/pure-css-float-labels
5
5
*/
@@ -24,21 +24,21 @@ https://github.com/adamculpepper/pure-css-float-labels
24
24
user-select : none; /* Non-prefixed version, currently supported by Chrome, Opera and Firefox */
25
25
}
26
26
.has-float-label .form-control {padding-top : 15px ; padding-bottom : 0 ;}
27
- .has-float-label .form-control : placeholder-shown : not (: focus ) + label {
28
- opacity : 0.50 ;
29
- top : 50% ;
30
- transform : translateY (-50% );
31
- font-size : 1rem ;
32
- color : inherit;
33
- }
27
+ .has-float-label .form-control : placeholder-shown : not (: focus ) + label {opacity : 0.50 ; top : 50% ; transform : translateY (-50% ); font-size : 1rem ; color : inherit;}
28
+
29
+ /* :disabled and :readonly styles */
30
+ .has-float-label .form-control : read-only ,
31
+ .has-float-label .form-control : disabled ,
32
+ .has-float-label .form-control : disabled + label {opacity : 0.5 ;}
34
33
35
34
/* Textarea elements*/
36
35
.has-float-label textarea .form-control : placeholder-shown : not (: focus ) + label {top : 1.5rem ;}
37
36
38
37
/* Select elements*/
39
38
.has-float-label select .form-control {padding-left : 0.50rem ;}
40
39
.has-float-label select .form-control : placeholder-shown : not (: focus ) + label {top : 1.5rem ;}
41
- .has-float-label select .form-control option [value = "" ][disabled ] {display : none;}
40
+ .has-float-label select .form-control option [value = "" ]: read-only ,
41
+ .has-float-label select .form-control option [value = "" ]: disabled {display : none;}
42
42
43
43
/* Hide placeholders since we're taking care of those with label elements */
44
44
.has-float-label ::-webkit-input-placeholder {color : transparent!important ;}
0 commit comments