Skip to content

Commit

Permalink
refactor some css code
Browse files Browse the repository at this point in the history
  • Loading branch information
GIroSTarK committed Jul 27, 2023
1 parent 81b5259 commit d5edc58
Showing 1 changed file with 6 additions and 37 deletions.
43 changes: 6 additions & 37 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,16 @@ body {
display: flex;
height: 16px;
width: 16px;
background-image: url(images/star.svg);
background-repeat: no-repeat;
background-position: center;
margin-right: 4px;
}

.stars--0 :nth-child(n) {
background-image: url(images/star.svg);
}

.stars--1 :nth-child(n + 2) {
background-image: url(images/star.svg);
}

.stars--1 :first-child {
background-image: url(images/star-active.svg);
}

.stars--2 :nth-child(n + 3) {
background-image: url(images/star.svg);
}

.stars--2 :nth-child(-n + 2) {
background-image: url(images/star-active.svg);
}

.stars--3 :nth-child(n + 4) {
background-image: url(images/star.svg);
}

.stars--3 :nth-child(-n + 3) {
background-image: url(images/star-active.svg);
}

.stars--4 :nth-child(-n + 4) {
background-image: url(images/star-active.svg);
}

.stars--4 :last-child {
background-image: url(images/star.svg);
}

.stars--5 :nth-child(n) {
.stars--1 :nth-child(-n+1),
.stars--2 :nth-child(-n+2),
.stars--3 :nth-child(-n+3),
.stars--4 :nth-child(-n+4),
.stars--5 :nth-child(-n+5) {
background-image: url(images/star-active.svg);
}

0 comments on commit d5edc58

Please sign in to comment.