1
1
/*
2
- pure-css-float-labels v1.5
2
+ pure-css-float-labels v1.6
3
3
by Adam Culpepper | @adamculpepper
4
4
https://github.com/adamculpepper/pure-css-float-labels
5
5
*/
@@ -8,12 +8,16 @@ https://github.com/adamculpepper/pure-css-float-labels
8
8
.has-float-label label {
9
9
opacity : 0.70 ;
10
10
position : absolute;
11
- left : 0.85rem ;
12
11
top : 0.20rem ;
12
+ width : 100% ;
13
13
font-size : 0.75rem ;
14
14
transition : all 0.30s ;
15
15
color : blue;
16
16
margin-bottom : 0 ;
17
+ padding-left : 0.85rem ;
18
+ overflow : hidden;
19
+ white-space : nowrap;
20
+ text-overflow : ellipsis;
17
21
cursor : text;
18
22
pointer-events : none;
19
23
-webkit-touch-callout : none; /* iOS Safari */
@@ -28,22 +32,17 @@ https://github.com/adamculpepper/pure-css-float-labels
28
32
29
33
/* :disabled and :readonly styles */
30
34
.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 ;}
35
+ .has-float-label .form-control : disabled ,
36
+ .has-float-label .form-control : disabled + label {opacity : 0.5 ;}
33
37
34
38
/* Textarea elements*/
35
39
.has-float-label textarea .form-control : placeholder-shown : not (: focus ) + label {top : 1.5rem ;}
36
40
37
41
/* Select elements*/
38
42
.has-float-label select .form-control {padding-left : 0.50rem ;}
39
43
.has-float-label select .form-control : placeholder-shown : not (: focus ) + label {top : 1.5rem ;}
40
- .has-float-label select .form-control option [selected ]: read-only ,
41
- .has-float-label select .form-control option [selected ][disabled ] {display : none;}
42
- .has-float-label select .form-control option [disabled ] {opacity : 0.5 !important ; color : red;}
43
-
44
-
45
- [disabled ]: hover {cursor : not-allowed;}
46
-
44
+ .has-float-label select .form-control option [value = "" ]: read-only ,
45
+ .has-float-label select .form-control option [value = "" ]: disabled {display : none;}
47
46
48
47
/* Hide placeholders since we're taking care of those with label elements */
49
48
.has-float-label ::-webkit-input-placeholder {color : transparent!important ;}
0 commit comments