-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 task solution #5112
base: master
Are you sure you want to change the base?
add task solution #5112
Conversation
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.
Hello! 😊 You've done a great job with the HTML, CSS, and SCSS files, and most of your code meets the task requirements. However, there are a few critical issues that need to be addressed before we can approve the pull request:
-
SCSS Variables: The task requires the use of SCSS variables for main values, which should be placed in a separate file. This is currently missing, so please ensure to define and use SCSS variables appropriately.
-
BEM File Organization: The task specifies that each BEM block (
card
andstars
) should have its own file. Currently, the files are not organized according to BEM methodology. Please separate them into individual files. -
Background Image URL: The
background-image: url()
should be relative to theindex.scss
and start with../images
. The current implementation uses an absolute path, which needs to be corrected. -
SCSS Nesting: There is an incorrect use of the
&
selector in the SCSS for the stars component. The selector should be.stars--4 .stars__star:nth-child(-n + 4)
to correctly target the first four stars. -
Unnecessary Files: Since SCSS is being used and compiled by Parcel, the
card.css
andstars.css
files are not needed and should be removed to avoid confusion.
Please address these issues to ensure your code fully meets the task requirements. Keep up the great work, and I'm confident you'll have this sorted out in no time! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
src/styles/blocks/stars.scss
Outdated
.stars--4 &__star:nth-child(-n + 4) { | ||
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.
The selector '.stars--4 &__star:nth-child(-n + 4)' is incorrect. The '&' should be used to refer to the parent selector, but here it is used incorrectly. It should be '.stars--4 .stars__star:nth-child(-n + 4)' to correctly target the first four stars within an element with the 'stars--4' class.
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.
Great job on your progress! 🎉 Your HTML and SCSS files are well-structured, and you've effectively used BEM methodology. However, there are a few areas to improve:
- SCSS Variables: Create a separate file for SCSS variables to manage main values efficiently.
- Unnecessary Files: Remove the
index.css
file to avoid confusion since SCSS is being compiled by Parcel. - Universal Selector: Avoid using the universal selector (
*
) for resetting margins to prevent performance issues. - Background Image URL: Ensure the
background-image: url()
path is correct and relative toindex.scss
.
These adjustments will enhance your code quality. Keep up the great work, and make sure to address these points in future projects to continue improving your skills! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
width: 200px; | ||
height: 408px; | ||
background-color: #fff; | ||
background-image: url(../images/imac.jpeg); |
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.
The background-image: url()
should be relative to the index.scss
and start with ../images
. Please ensure the path is correct as per the task requirements.
* { | ||
margin: 0; | ||
} |
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.
The use of a universal selector (*
) for resetting margins is generally not recommended as it can lead to performance issues. Consider using a more specific selector or a CSS reset/normalize file.
border-radius: 5px; | ||
padding: 32px 16px 16px; | ||
} | ||
|
||
.card__name { | ||
display: flex; | ||
margin-top: 174px; | ||
margin-bottom: 4px; | ||
font-weight: 500; | ||
font-size: 12px; | ||
line-height: 18px; | ||
color: #060b35; | ||
} | ||
|
||
.card__name-code { | ||
color: #616070; | ||
font-size: 10px; | ||
line-height: 14px; | ||
margin-bottom: 16px; | ||
} | ||
|
||
.card__rate { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-bottom: 24px; | ||
} | ||
|
||
.card__review { | ||
font-size: 10px; | ||
color: #060b35; | ||
line-height: 14px; | ||
} | ||
|
||
.card__price { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-bottom: 16px; | ||
} | ||
|
||
.card__price-name { | ||
font-size: 12px; | ||
line-height: 18px; | ||
color: #616070; | ||
} | ||
|
||
.card__price-value { | ||
font-weight: 700; | ||
color: #060b35; | ||
font-size: 16px; | ||
line-height: 18px; | ||
} | ||
|
||
.card__button-action { | ||
display: flex; | ||
box-sizing: border-box; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: #00acdc; | ||
color: #fff; | ||
width: 166px; | ||
height: 40px; | ||
border: 0 solid transparent; | ||
border-radius: 5px; | ||
text-transform: uppercase; | ||
font-weight: 700; | ||
font-size: 14px; | ||
line-height: 16px; | ||
} | ||
|
||
.card__button-action:hover { | ||
background-color: transparent; | ||
color: #00acdc; | ||
border: 1px solid #00acdc; | ||
} | ||
|
||
.stars { | ||
display: flex; | ||
} | ||
|
||
.stars__star { | ||
display: flex; | ||
background-image: url(../images/star.svg); | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
width: 16px; | ||
height: 16px; | ||
margin-right: 4px; | ||
} | ||
|
||
.stars__star:last-child { | ||
margin-right: 0; | ||
} | ||
|
||
.stars--4 .stars__star:nth-child(-n + 4) { | ||
background-image: url(../images/star-active.svg); | ||
} | ||
|
||
/*# sourceMappingURL=index.css.map */ |
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.
This file seems to be a compiled CSS file from your SCSS sources. Since you are using SCSS and Parcel for compilation, this file is unnecessary and should be removed to prevent redundancy and potential confusion.
DEMO LINK
TEST REPORT LINK
there 2 BEM blocks
card
andstars
each in their own fileSCSS Nesting is used for
elements
,modifiers
andpseudo-classes
SCSS Variables are used for main values and placed in a separate file
all
stars--N
modifiers work as expected (Highlight firstN
stars)Code follows all the Code Style Rules ❗️