Skip to content

Commit

Permalink
fixing problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav0909 committed Nov 1, 2024
1 parent bdc3231 commit 22fa189
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 50 deletions.
69 changes: 26 additions & 43 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,31 @@
/>
</head>
<body>
<div class="stars stars--0">
<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>

<section class="stars">
<div class="stars stars--0">
<span class="stars__star"></span><span class="stars__star"></span><span class="stars__star"></span>
<span class="stars__star"></span><span class="stars__star"></span>
</div>
<div class="stars stars--1">
<span class="stars__star"></span><span class="stars__star"></span><span class="stars__star"></span>
<span class="stars__star"></span><span class="stars__star"></span>
</div>
<div class="stars stars--2">
<span class="stars__star"></span><span class="stars__star"></span><span class="stars__star"></span>
<span class="stars__star"></span><span class="stars__star"></span>
</div>
<div class="stars stars--3">
<span class="stars__star"></span><span class="stars__star"></span><span class="stars__star"></span>
<span class="stars__star"></span><span class="stars__star"></span>
</div>
<div class="stars stars--4">
<span class="stars__star"></span><span class="stars__star"></span><span class="stars__star"></span>
<span class="stars__star"></span><span class="stars__star"></span>
</div>
<div class="stars stars--5">
<span class="stars__star"></span><span class="stars__star"></span><span class="stars__star"></span>
<span class="stars__star"></span><span class="stars__star"></span>
</div>
</section>
</body>
</html>
15 changes: 8 additions & 7 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
* {

body, html, section {
margin: 0;
padding: 0;
}

.stars {
display: flex;
width: fit-content;
}

.stars__star {
width: 16px;
height: 16px;
background-image: url("./images/star.svg");
width: 20px;
height: 20px;
background-image: url('./images/star.svg');
background-size: cover;
margin-right: 5px;
}

.stars--0 .stars__star:nth-child(-n+0),
Expand All @@ -20,6 +22,5 @@
.stars--3 .stars__star:nth-child(-n+3),
.stars--4 .stars__star:nth-child(-n+4),
.stars--5 .stars__star:nth-child(-n+5) {
background-image: url("./images/star-active.svg");
background-image: url('./images/star-active.svg');
}

0 comments on commit 22fa189

Please sign in to comment.