-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Expand file tree
/
Copy pathstars.css
More file actions
37 lines (30 loc) · 769 Bytes
/
stars.css
File metadata and controls
37 lines (30 loc) · 769 Bytes
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
.stars {
display: flex;
padding: 0;
}
.stars__star {
width: 16px;
height: 16px;
display: block;
background-repeat: no-repeat;
background-position: center;
background-image: url('./images/star.svg');
}
.stars__star:not(:last-child) {
margin-right: 4px;
}
.stars--1 .stars__star:nth-child(-n + 1) {
background-image: url('./images/star-active.svg');
}
.stars--2 .stars__star:nth-child(-n + 2) {
background-image: url('./images/star-active.svg');
}
.stars--3 .stars__star:nth-child(-n + 3) {
background-image: url('./images/star-active.svg');
}
.stars--4 .stars__star:nth-child(-n + 4) {
background-image: url('./images/star-active.svg');
}
.stars--5 .stars__star:nth-child(-n + 5) {
background-image: url('./images/star-active.svg');
}