-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Added task solution #5517
base: master
Are you sure you want to change the base?
Added task solution #5517
Conversation
cmac2617
commented
Mar 21, 2025
- 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.
Review Summary
Hey there! 👋 Thanks for your submission! There are a couple of things to adjust: The styling for .stars--5
could be more consistent with other modifiers by using :nth-child
. Also, remember to create separate files for each BEM block and keep your CSS lines under 80 characters. Keep up the great work! ✨
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review
button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor
tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
src/style.css
Outdated
.stars--5 > .stars__star { | ||
background-image: url('./images/star-active.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
height: 16px; | ||
width: 16px; | ||
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.
For consistency with the other modifiers, consider using :nth-child
here as well. This will ensure a uniform approach for applying the active state to the stars. For example: .stars--5 > :nth-child(-n + 5)
.
Also, according to the task description:
Yellow stars are added with container modifier + pseudo-selector (NO extra classes)
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.
Review Summary
Okay, great job completing the task! 🎉 I'm approving this pull request so you can move forward.
Here's a summary of the feedback to help you improve:
-
CSS File Structure: Remember to split your CSS code into separate files for each BEM block. This makes your code more organized and easier to maintain. For example, the
.stars
block,.stars__star
element, and any modifiers (like.stars--large
) should each have their own CSS file (e.g.,stars.css
,stars__star.css
,stars--large.css
). This adheres to the BEM principle of modularity. -
Line Length: In
src/style.css
, try to keep lines of code to a maximum of 80 characters for better readability. You can break long lines into multiple shorter lines to stay within this limit.
Keep up the great work! 💪 By addressing these points in future pull requests, you'll be writing even cleaner and more maintainable code. Feel free to ask if you have any questions!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
.stars { | ||
margin: 0; | ||
padding: 0; | ||
display: flex; | ||
|
||
/* justify-content: space-between; */ | ||
|
||
/* width: 96px; */ | ||
} |
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.
According to the checklist, "Each BEM block has its own separate file". Consider creating a separate file for the .stars
block.
.stars__star { | ||
background-image: url('./images/star.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
height: 16px; | ||
width: 16px; | ||
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.
According to the checklist, "Each BEM block has its own separate file". Consider creating a separate file for the .stars__star
block.
.stars--1 > :nth-child(-n + 1) { | ||
background-image: url('./images/star-active.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
height: 16px; | ||
width: 16px; | ||
margin-right: 4px; | ||
} | ||
|
||
.stars--2 > :nth-child(-n + 2) { | ||
background-image: url('./images/star-active.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
height: 16px; | ||
width: 16px; | ||
margin-right: 4px; | ||
} | ||
|
||
.stars--3 > :nth-child(-n + 3) { | ||
background-image: url('./images/star-active.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
height: 16px; | ||
width: 16px; | ||
margin-right: 4px; | ||
} | ||
|
||
.stars--4 > :nth-child(-n + 4) { | ||
background-image: url('./images/star-active.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
height: 16px; | ||
width: 16px; | ||
margin-right: 4px; | ||
} | ||
|
||
.stars--5 > :nth-child(-n + 5) { | ||
background-image: url('./images/star-active.svg'); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
height: 16px; | ||
width: 16px; | ||
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.
According to the checklist, "Each BEM block has its own separate file". Consider creating a separate file for the stars
block modifiers.