-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 #4819
base: master
Are you sure you want to change the base?
add task solution #4819
Conversation
d1nexl
commented
Oct 30, 2024
- DEMO 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 effort on your project! 🎉 While your code is approved to help you move forward with your learning, there are a few areas to improve:
-
SCSS Compilation: Ensure your SCSS is compiled to CSS, as browsers cannot interpret SCSS files directly. Update your HTML to link to the compiled CSS file.
-
Hover Effects: The current hover effect on
.card
usingtransform: scale(1.2)
can cause layout shifts. Consider alternative effects like changing background color or adding a shadow to enhance user experience. -
Code Redundancy: The repetitive product card content can be optimized. Consider using a templating engine or JavaScript to dynamically generate cards, which will improve maintainability.
-
BEM and Data Attributes: Ensure all HTML classes follow BEM conventions and that data attributes match the task requirements, such as
data-qa="card-hover"
for the first card's "Buy" link. -
Responsive Design: Verify that your grid layout and media queries achieve the desired responsive behavior across different screen resolutions.
Keep up the good work, and use this feedback to refine your skills! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
@@ -17,11 +17,379 @@ | |||
/> | |||
<link | |||
rel="stylesheet" | |||
href="styles/index.scss" | |||
href="/src/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 pointing to a SCSS file. Browsers do not understand SCSS directly; it needs to be compiled to CSS first. Ensure that the SCSS is compiled to a CSS file and update the href to point to the resulting CSS file.
/> | ||
<div class="card__description card__description--margin--top"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</div> | ||
<div class="card__code card__code--margin--top"> | ||
Product code: 195434 | ||
</div> | ||
<div class="card__rating card__rating--margin--top"> | ||
<ul class="stars"> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
</ul> | ||
<div class="card__reviews">Reviews: 5</div> | ||
</div> | ||
<div class="card__priceBlock card__priceBlock--margin--top"> | ||
<div class="card__txt">Price:</div> | ||
<div class="card__price">$2,199</div> | ||
</div> | ||
<div data-qa="hover"> | ||
<a | ||
class="card__button card__button--margin--top" | ||
href="/" | ||
> | ||
BUY | ||
</a> | ||
</div> | ||
</div> | ||
<div class="card"> | ||
<img | ||
class="card__image" | ||
src="/src/images/imac.jpeg" | ||
alt="Card-Image" | ||
/> | ||
<div class="card__description card__description--margin--top"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</div> | ||
<div class="card__code card__code--margin--top"> | ||
Product code: 195434 | ||
</div> | ||
<div class="card__rating card__rating--margin--top"> | ||
<ul class="stars"> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
</ul> | ||
<div class="card__reviews">Reviews: 5</div> | ||
</div> | ||
<div class="card__priceBlock card__priceBlock--margin--top"> | ||
<div class="card__txt">Price:</div> | ||
<div class="card__price">$2,199</div> | ||
</div> | ||
<div data-qa="hover"> | ||
<a | ||
class="card__button card__button--margin--top" | ||
href="/" | ||
> | ||
BUY | ||
</a> | ||
</div> | ||
</div> | ||
<div class="card"> | ||
<img | ||
class="card__image" | ||
src="/src/images/imac.jpeg" | ||
alt="Card-Image" | ||
/> | ||
<div class="card__description card__description--margin--top"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</div> | ||
<div class="card__code card__code--margin--top"> | ||
Product code: 195434 | ||
</div> | ||
<div class="card__rating card__rating--margin--top"> | ||
<ul class="stars"> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
<li class="stars__area stars__area--size"></li> | ||
</ul> | ||
<div class="card__reviews">Reviews: 5</div> | ||
</div> | ||
<div class="card__priceBlock card__priceBlock--margin--top"> | ||
<div class="card__txt">Price:</div> | ||
<div class="card__price">$2,199</div> | ||
</div> | ||
<div data-qa="hover"> | ||
<a | ||
class="card__button card__button--margin--top" | ||
href="/" | ||
> | ||
BUY | ||
</a> | ||
</div> | ||
</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.
The product cards are repeated with identical content. Consider using a templating engine or JavaScript to dynamically generate these cards to avoid redundancy and improve maintainability.
.card:hover { | ||
transform: scale(1.2); | ||
transition: 0.3s; |
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 hover effect on .card
uses transform: scale(1.2)
, which can cause layout shifts and affect the user experience. Consider using a different visual effect that doesn't alter the element's size, such as changing the background color or adding a shadow.