-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solution | layout-stars #3757
base: master
Are you sure you want to change the base?
Solution | layout-stars #3757
Conversation
Reyti
commented
Nov 1, 2023
- DEMO LINK
- TEST REPORT LINK
@@ -21,8 +21,8 @@ Follow | |||
|
|||
❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description: | |||
|
|||
- [DEMO LINK](https://<your_account>.github.io/layout_stars/) | |||
- [TEST REPORT LINK](https://<your_account>.github.io/layout_stars/report/html_report/) | |||
- [DEMO LINK](https://Reyti.github.io/layout_stars/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check your deployment since DEMO link leads to readme.md and TEST link leads to 404 page
src/style.css
Outdated
.stars--0 .stars__star:nth-child(n):not(:nth-child(n+1)) { | ||
background-image: url("images/star-active.svg"); | ||
} | ||
|
||
.stars--1 .stars__star:nth-child(n):not(:nth-child(n+2)) { | ||
background-image: url("images/star-active.svg"); | ||
} | ||
|
||
.stars--2 .stars__star:nth-child(n):not(:nth-child(n+3)) { | ||
background-image: url("images/star-active.svg"); | ||
} | ||
|
||
.stars--3 .stars__star:nth-child(n):not(:nth-child(n+4)) { | ||
background-image: url("images/star-active.svg"); | ||
} | ||
|
||
.stars--4 .stars__star:nth-child(n):not(:nth-child(n+5)) { | ||
background-image: url("images/star-active.svg"); | ||
} | ||
|
||
.stars--5 .stars__star:nth-child(n):not(:nth-child(n+6)) { | ||
background-image: url("images/star-active.svg"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use as a list
.stars--0 .stars__star:nth-child(n):not(:nth-child(n+1)) { | |
background-image: url("images/star-active.svg"); | |
} | |
.stars--1 .stars__star:nth-child(n):not(:nth-child(n+2)) { | |
background-image: url("images/star-active.svg"); | |
} | |
.stars--2 .stars__star:nth-child(n):not(:nth-child(n+3)) { | |
background-image: url("images/star-active.svg"); | |
} | |
.stars--3 .stars__star:nth-child(n):not(:nth-child(n+4)) { | |
background-image: url("images/star-active.svg"); | |
} | |
.stars--4 .stars__star:nth-child(n):not(:nth-child(n+5)) { | |
background-image: url("images/star-active.svg"); | |
} | |
.stars--5 .stars__star:nth-child(n):not(:nth-child(n+6)) { | |
background-image: url("images/star-active.svg"); | |
} | |
.stars--0 .stars__star:nth-child(n):not(:nth-child(n+1)), | |
.stars--1 .stars__star:nth-child(n):not(:nth-child(n+2)), | |
.stars--2 .stars__star:nth-child(n):not(:nth-child(n+3)), | |
.stars--3 .stars__star:nth-child(n):not(:nth-child(n+4)), | |
.stars--4 .stars__star:nth-child(n):not(:nth-child(n+5)), | |
.stars--5 .stars__star:nth-child(n):not(:nth-child(n+6)) { | |
background-image: url("images/star-active.svg"); | |
} |
src/style.css
Outdated
@@ -0,0 +1,43 @@ | |||
* { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not a good practice to reset styles using *
selector
src/style.css
Outdated
} | ||
|
||
.stars__star { | ||
margin: 0 2px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use :not(:last-child)
to set margin-right
to each star besides last one
src/style.css
Outdated
|
||
.stars__star { | ||
margin: 0 2px; | ||
margin-top: 2px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant
margin-top: 2px; |
src/style.css
Outdated
width: 16px; | ||
height: 14px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should have the same width and height
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good job. left one comment. approved in advance
background-image: url("images/star.svg"); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
margin-right: 4px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove margin-right for last child