-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
add solution #4830
base: master
Are you sure you want to change the base?
add solution #4830
Conversation
Vl-Tsr
commented
Sep 14, 2024
- DEMO LINK
- TEST REPORT LINK
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.
Hey there! It looks like we need to make a few adjustments regarding the way we're styling elements. Specifically, we should avoid styling directly using tag names and instead use classes. This is a best practice that helps keep our CSS maintainable and our HTML semantic. Also, let's make sure that our margins are consistent to avoid any layout issues, and we should tidy up our HTML formatting for better readability. Keep up the great work, and with these changes, your code will be even more solid! 👍💻
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
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.
add solution
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.
Almost done, just one suggestion.
src/style.css
Outdated
.stars--5 .stars__star { | ||
background-image: url(./images/star-active.svg); | ||
} | ||
|
||
.stars--1 .stars__star:first-child { | ||
background-image: url(./images/star-active.svg); | ||
} | ||
|
||
.stars--2 .stars__star:nth-child(-n + 2) { | ||
background-image: url(./images/star-active.svg); | ||
} | ||
|
||
.stars--3 .stars__star:nth-child(-n + 3) { | ||
background-image: url(./images/star-active.svg); | ||
} | ||
|
||
.stars--4 .stars__star:not(:last-child) { | ||
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.
It can be simplified:
.stars--5 .stars__star { | |
background-image: url(./images/star-active.svg); | |
} | |
.stars--1 .stars__star:first-child { | |
background-image: url(./images/star-active.svg); | |
} | |
.stars--2 .stars__star:nth-child(-n + 2) { | |
background-image: url(./images/star-active.svg); | |
} | |
.stars--3 .stars__star:nth-child(-n + 3) { | |
background-image: url(./images/star-active.svg); | |
} | |
.stars--4 .stars__star:not(:last-child) { | |
background-image: url(./images/star-active.svg); | |
} | |
.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); | |
} |
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.
lgtm