-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
develop #4861
base: master
Are you sure you want to change the base?
develop #4861
Conversation
Daniil-102
commented
Oct 16, 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.
Great job so far! There are a few minor issues that need to be addressed before we can merge your pull request. Please take a look at the comments and make the necessary changes. Keep up the good work! 😀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
src/index.html
Outdated
src="images/imac.jpeg" | ||
alt="card__image" |
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 alt attribute of the img tag should describe the image, not just contain a class name. Try to provide a meaningful description.
src/index.html
Outdated
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</h2> |
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 shortening the text inside the h2 tag. If it's necessary to keep it long, you might want to break it into smaller parts for better readability.
src/index.html
Outdated
<div class="card__stars card__stars--4"> | ||
<div class="card__stars-star"></div> | ||
<div class="card__stars-star"></div> | ||
<div class="card__stars-star"></div> | ||
<div class="card__stars-star"></div> | ||
<div class="card__stars-star"></div> |
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.
Using div elements for stars might not be the best choice semantically. It's better to use span elements for such cases.
src/index.html
Outdated
<button | ||
class="card__button" | ||
data-qa="hover" | ||
> | ||
BUY | ||
</button> |
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 button element is missing a type attribute. It's a good practice to always include it for accessibility reasons. In this case, the type should be 'button'.
src/styles/index.css
Outdated
} | ||
|
||
.card { | ||
max-width: 200px; |
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 max-width
property is not necessary here if you already set the width
property in the .card__content
class. It's better to remove it to avoid confusion.
src/styles/index.scss
Outdated
} | ||
|
||
.card { | ||
max-width: 200px; |
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 max-width property limits the maximum width of an element, which may lead to unexpected behavior when the parent container is smaller than the max-width. Consider using the width property instead.
src/styles/index.scss
Outdated
display: flex; | ||
flex-direction: column; | ||
box-sizing: border-box; | ||
width: 200px; |
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 width property here is redundant because its parent (.card) already has a width set. This can lead to unexpected behavior, especially if the parent width changes in the future.
src/styles/index.scss
Outdated
width: 16px; | ||
height: 16px; | ||
background-image: url('../images/star.svg'); | ||
background-size: auto; |
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-size property should be set to 'cover' to ensure that the background image covers the full area of the div, regardless of the div size.
src/styles/index.scss
Outdated
&__price { | ||
display: flex; | ||
justify-content: space-between; | ||
margin-block: 24px 16px; |
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 margin-block property is not widely supported and may not work in all browsers. Consider using the margin property instead.
src/styles/index.scss
Outdated
line-height: 16px; | ||
background: $blue; | ||
border-radius: 5px; | ||
margin: 0 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.
The margin property here seems to be used to center the button. A better approach would be to use auto margins or flexbox for centering.
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 work! 🎉 While there are a few minor improvements suggested, they don't impact the core functionality of your code. Keep up the good work and consider the feedback for future enhancements!
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" | ||
rel="stylesheet" | ||
/> | ||
|
||
<link | ||
rel="stylesheet" | ||
href="./styles/index.scss" |
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 href attribute is linking to a SCSS file. HTML files should link to CSS files instead. Please compile your SCSS to CSS and link to the resulting CSS file.
border: 1px solid #00acdc; | ||
|
||
&:hover { | ||
color: $color-blue-accent; |
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 color value for the hover state is using a variable ($color-blue-accent), which is good for consistency. However, ensure that this variable is defined in your variables file. If it's not, this could lead to unexpected results.
|
||
&:hover { | ||
color: $color-blue-accent; | ||
background-color: $color-white; |
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-color value for the hover state is using a variable ($color-white), which is good for consistency. However, ensure that this variable is defined in your variables file. If it's not, this could lead to unexpected results.
margin-left: 0; | ||
} | ||
|
||
.stars--0 .stars__star:nth-child(-n + 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 selector '.stars--0 .stars__star:nth-child(-n + 0)' is redundant because '-n + 0' will not select any elements. Consider removing this rule if it is not needed.
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.
Looks good 🔥
background-color: #00acdc; | ||
color: #fff; | ||
box-sizing: border-box; | ||
border: 1px solid #00acdc; |
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.
You have a variable for this color, don't forget to use it