Skip to content

Commit

Permalink
implemented solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Julia committed Oct 21, 2024
1 parent bfc531d commit 6791b9d
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 2 deletions.
81 changes: 80 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,85 @@
/>
</head>
<body>
<h1>Stars</h1>
<div class="stars">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<div class="stars stars--1">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<div class="stars stars--2">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<div class="stars stars--3">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<div class="stars stars--4">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>
<div class="stars stars--5">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
</div>

<!-- <div class="box">
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
<div class="box__item"></div>
</div> -->
</body>
</html>
31 changes: 30 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
/* add styles here */
body {
margin: 0;
padding: 0;
}

.stars {
display: flex;
}

.stars__star {
width: 16px;
height: 16px;
background-position: center;
background-repeat: no-repeat;
background-image: url('images/star.svg');
}

.stars__star:not(:last-child) {
margin-right: 4px;
}

.stars--0 :nth-child(0),
.stars--1 :nth-child(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 6791b9d

Please sign in to comment.