Skip to content

Commit

Permalink
update task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
leraMeleshchenko committed Oct 30, 2024
1 parent d7bdbf4 commit f5b1e2a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<title>Stars</title>
<link
rel="stylesheet"
href="./style.css"
href="./styles/style.css"
/>
</head>
<body>
Expand Down
3 changes: 3 additions & 0 deletions src/styles/blocks/stars.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.stars {
display: flex;
}
15 changes: 2 additions & 13 deletions src/style.css → src/styles/blocks/stars__star.css
Original file line number Diff line number Diff line change
@@ -1,29 +1,18 @@
/* add styles here */

body {
margin: 0;
}

.stars {
display: flex;
}

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

.stars--0 .stars__star:nth-child(-n + 0),
.stars--1 .stars__star:nth-child(-n + 1),
.stars--2 .stars__star:nth-child(-n + 2),
.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');
background-repeat: no-repeat;
background-position: center;
}
10 changes: 10 additions & 0 deletions src/styles/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* add styles here */

/* stylelint-disable-next-line import-notation */
@import './blocks/stars.css';
/* stylelint-disable-next-line import-notation */
@import './blocks/stars__star.css';

body {
margin: 0;
}

0 comments on commit f5b1e2a

Please sign in to comment.