-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
104 lines (62 loc) · 1.25 KB
/
style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,body{
width: 100%;
height: 100%;
}
body{
font-family: Arial, sans-serif;
}
.container{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
background-color: #e9f6ef;
}
#rating-value{
width: 110px;
min-height: 45px;
margin: 40px auto 0;
padding: 10px 5px;
text-align: center;
box-shadow: inset 0 0 2px 1px rgba(46,204,113,.2);
border: 2px solid green;
}
.rating{
width: 300px;
margin: 0 auto;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.rating > input{
display: none;
}
.rating > label {
color: #b3bbeb;
font-size: 30px;
padding: 7px;
cursor: pointer;
}
.rating:hover label:not(label:hover ~ label){
color: green; /* gdy label:hover wcześniejsze gwiazdki zielony */
}
label:hover ~ label {
color: #b3bbeb; /* szary */
}
input:checked + label {
color: #58e060; /* jasny zielony*/
}
.rating > label:not(input:checked ~ label) {
color: #58e060; /* gdy input:checked gwiazdki przed nim jasny zielony*/
}
.rating > input:checked ~ label:hover ~ label{
color: #b3bbeb; /* gdy input:checked następne gwiazdki szary */
}