-
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
add task solution #5275
base: master
Are you sure you want to change the base?
add task solution #5275
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.
Great job on the implementation! 🎉 Your code meets the task requirements, and the structure is well-organized. While there are a few minor improvements suggested, such as placing SCSS variables in a separate file and ensuring the card
block is explicitly defined, these do not significantly impact the functionality. Keep up the good work, and consider these suggestions for future enhancements! 😊
✨ 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.
src/index.html
Outdated
<h1 class="product-card__content"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</h1> |
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 tag used for title of the full page, so will be better if you use another tag here
<h1 class="product-card__content"> | |
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | |
</h1> | |
<h3 class="product-card__content"> | |
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | |
</h3> |
src/index.html
Outdated
<ul class="stars__product-rating"> | ||
<li class="stars__star"></li> | ||
<li class="stars__star"></li> | ||
<li class="stars__star"></li> | ||
<li class="stars__star"></li> | ||
<li class="stars__star"></li> |
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 the modifier class
<ul class="stars__product-rating"> | |
<li class="stars__star"></li> | |
<li class="stars__star"></li> | |
<li class="stars__star"></li> | |
<li class="stars__star"></li> | |
<li class="stars__star"></li> | |
<ul class="stars stars--4"> | |
<li class="stars__star"></li> | |
<li class="stars__star"></li> | |
<li class="stars__star"></li> | |
<li class="stars__star"></li> | |
<li class="stars__star"></li> |
src/styles/blocks/body.scss
Outdated
$primary-color: #00acdc; | ||
$secondary-color: #fff; | ||
$color-text: #616070; | ||
$primary-color-text: #060b35; |
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.
Move variables to the separate file, for example variables.scss
src/styles/blocks/product-card.scss
Outdated
text-align: center; | ||
text-decoration: none; | ||
} | ||
|
||
&__buy:hover { | ||
display: flex; |
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 scss nesting, fix it everywhere
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 work! Almost done!
src/styles/blocks/product-card.scss
Outdated
.product-card { | ||
width: 200px; | ||
box-sizing: border-box; | ||
height: 406px; |
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.
height: 406px; |
The height should depend on the content
src/styles/blocks/product-card.scss
Outdated
top: 1px; | ||
left: 1px; |
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.
top: 1px; | |
left: 1px; |
src/styles/blocks/product-card.scss
Outdated
width: 98px; | ||
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.
width: 98px; | |
height: 14px; |
src/styles/blocks/product-card.scss
Outdated
width: 98px; | ||
height: 14px; | ||
margin-top: 4px; | ||
left: 17px; |
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.
left: 17px; |
src/styles/blocks/product-card.scss
Outdated
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 166px; |
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.
width: 166px; | |
width: 100%; |
src/styles/blocks/stars.scss
Outdated
margin-right: 4px; | ||
} | ||
|
||
&--4 &__star:nth-child(-n + 4) { |
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.
Consider using all classes from the previous task
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 👍
&--4 &__star:nth-child(-n + 4), | ||
&--1 &__star:nth-child(-n + 1), | ||
&--2 &__star:nth-child(-n + 2), | ||
&--3 &__star:nth-child(-n + 3), | ||
&--5 &__star:nth-child(-n + 5) { |
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.
&--4 &__star:nth-child(-n + 4), | |
&--1 &__star:nth-child(-n + 1), | |
&--2 &__star:nth-child(-n + 2), | |
&--3 &__star:nth-child(-n + 3), | |
&--5 &__star:nth-child(-n + 5) { | |
&--1 &__star:nth-child(-n + 1), | |
&--2 &__star:nth-child(-n + 2), | |
&--3 &__star:nth-child(-n + 3), | |
&--4 &__star:nth-child(-n + 4), | |
&--5 &__star:nth-child(-n + 5) { |
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 ❗️