11/*
2- pure-css-float-labels v1.4
2+ pure-css-float-labels v1.5
33by Adam Culpepper | @adamculpepper
44https://github.com/adamculpepper/pure-css-float-labels
55*/
@@ -24,21 +24,21 @@ https://github.com/adamculpepper/pure-css-float-labels
2424 user-select : none; /* Non-prefixed version, currently supported by Chrome, Opera and Firefox */
2525}
2626.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 ;}
3433
3534/* Textarea elements*/
3635.has-float-label textarea .form-control : placeholder-shown : not (: focus ) + label {top : 1.5rem ;}
3736
3837/* Select elements*/
3938.has-float-label select .form-control {padding-left : 0.50rem ;}
4039.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;}
4242
4343/* Hide placeholders since we're taking care of those with label elements */
4444.has-float-label ::-webkit-input-placeholder {color : transparent!important ;}
0 commit comments