-
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
add task solution #4914
base: master
Are you sure you want to change the base?
add task solution #4914
Conversation
julia303920201
commented
Dec 9, 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.
Thank you for your hard work on this project! 🎉 However, there are a few critical issues that need to be addressed before we can approve the pull request:
-
SCSS Compilation: The
href
attribute in your HTML is pointing to a.scss
file, which browsers cannot interpret. Please compile your SCSS to CSS and link the resulting CSS file instead. -
Layout Shifts on Hover: Using
transform: scale(1.2)
on hover can cause layout shifts, especially in grid or flex layouts. Consider using a smaller scale value or a different effect to avoid disrupting the layout. -
Repetitive Content: The content within the
article
elements is highly repetitive. Consider using a templating engine or JavaScript to dynamically generate this content, which will reduce redundancy and improve maintainability.
Once these issues are resolved, your code will be in great shape! Keep up the great work, and feel free to reach out if you have any questions or need further assistance. 😊
✨ 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/index.html
Outdated
<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 cannot directly interpret SCSS files. You should compile the SCSS to CSS and link the resulting CSS file instead.
src/index.html
Outdated
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
</div> | ||
|
||
<p class="review-descr">Reviews: 5</p> | ||
</div> | ||
|
||
<div class="card__price"> | ||
<p class="price-text">Price:</p> | ||
|
||
<p class="price-amount">$2,199</p> | ||
</div> | ||
|
||
<a class="card__button">BUY</a> | ||
</article> | ||
|
||
<article class="card"> | ||
<div class="card__img-cover"> | ||
<img | ||
src="/src/images/imac.jpeg" | ||
alt="imac" | ||
class="card__img" | ||
/> | ||
</div> | ||
|
||
<h2 class="card__title"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</h2> | ||
|
||
<p class="card__descr">Product code: 195434</p> | ||
|
||
<div class="card__reviews"> | ||
<div class="stars stars--4"> | ||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
</div> | ||
|
||
<p class="review-descr">Reviews: 5</p> | ||
</div> | ||
|
||
<div class="card__price"> | ||
<p class="price-text">Price:</p> | ||
|
||
<p class="price-amount">$2,199</p> | ||
</div> | ||
|
||
<a class="card__button">BUY</a> | ||
</article> | ||
|
||
<article class="card"> | ||
<div class="card__img-cover"> | ||
<img | ||
src="/src/images/imac.jpeg" | ||
alt="imac" | ||
class="card__img" | ||
/> | ||
</div> | ||
|
||
<h2 class="card__title"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</h2> | ||
|
||
<p class="card__descr">Product code: 195434</p> | ||
|
||
<div class="card__reviews"> | ||
<div class="stars stars--4"> | ||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
</div> | ||
|
||
<p class="review-descr">Reviews: 5</p> | ||
</div> | ||
|
||
<div class="card__price"> | ||
<p class="price-text">Price:</p> | ||
|
||
<p class="price-amount">$2,199</p> | ||
</div> | ||
|
||
<a class="card__button">BUY</a> | ||
</article> |
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 content within the article
elements is highly repetitive. Consider using a templating engine or JavaScript to dynamically generate this content to reduce redundancy and improve maintainability.
} | ||
|
||
&:hover { | ||
transform: scale(1.2); |
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 transform: scale(1.2)
on hover can cause layout shifts and might lead to unexpected behavior, especially if the card is part of a grid or flex layout. Consider using a smaller scale value or another effect to avoid disrupting the layout.
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 submission! 🎉 While your code meets most of the task requirements, there are a few areas for improvement that will enhance your project's functionality and maintainability:
-
Layout Shifts on Hover: The
transform: scale(1.2)
on hover for the.card
class can cause layout shifts, affecting neighboring elements. Consider using a smaller scale value or a different effect to maintain a smooth user experience. -
Repetitive Content: The HTML file contains repetitive content within the
article
elements. Using a templating engine or JavaScript to dynamically generate this content can significantly improve maintainability. -
SCSS Compilation: Browsers cannot interpret SCSS files directly. Ensure that your SCSS is compiled into CSS and update the
href
attribute in your HTML to link to the compiled CSS file. -
Import Order: Make sure to import
mixins-variables-fonts
before any styles that use these variables or mixins to prevent any undefined variable issues. -
Redundant Media Query: There's a redundant media query for
.catalog
that duplicates themedia-mixin
. Removing this will help avoid conflicts and streamline your code.
These adjustments will not only meet the task requirements but also help you develop cleaner and more efficient code. Keep up the great work, and continue to learn from these experiences! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
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.
Browsers cannot interpret SCSS files directly. You need to compile your SCSS file into a CSS file and link to the resulting CSS file instead. Update the href
attribute to point to the compiled CSS file.
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
</div> | ||
|
||
<p class="review-descr">Reviews: 5</p> | ||
</div> | ||
|
||
<div class="card__price"> | ||
<p class="price-text">Price:</p> | ||
|
||
<p class="price-amount">$2,199</p> | ||
</div> | ||
|
||
<a class="card__button">BUY</a> | ||
</article> | ||
|
||
<article class="card"> | ||
<div class="card__img-cover"> | ||
<img | ||
src="/images/imac.jpeg" | ||
alt="imac" | ||
class="card__img" | ||
/> | ||
</div> | ||
|
||
<h2 class="card__title"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</h2> | ||
|
||
<p class="card__descr">Product code: 195434</p> | ||
|
||
<div class="card__reviews"> | ||
<div class="stars stars--4"> | ||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
</div> | ||
|
||
<p class="review-descr">Reviews: 5</p> | ||
</div> | ||
|
||
<div class="card__price"> | ||
<p class="price-text">Price:</p> | ||
|
||
<p class="price-amount">$2,199</p> | ||
</div> | ||
|
||
<a class="card__button">BUY</a> | ||
</article> | ||
|
||
<article class="card"> | ||
<div class="card__img-cover"> | ||
<img | ||
src="/images/imac.jpeg" | ||
alt="imac" | ||
class="card__img" | ||
/> | ||
</div> | ||
|
||
<h2 class="card__title"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</h2> | ||
|
||
<p class="card__descr">Product code: 195434</p> | ||
|
||
<div class="card__reviews"> | ||
<div class="stars stars--4"> | ||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
|
||
<div class="stars__star"></div> | ||
</div> | ||
|
||
<p class="review-descr">Reviews: 5</p> | ||
</div> | ||
|
||
<div class="card__price"> | ||
<p class="price-text">Price:</p> | ||
|
||
<p class="price-amount">$2,199</p> | ||
</div> | ||
|
||
<a class="card__button">BUY</a> | ||
</article> |
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 content within the article
elements is highly repetitive. Consider using a templating engine or JavaScript to dynamically generate this content to reduce redundancy and improve maintainability.
} | ||
|
||
&:hover { | ||
transform: scale(1.2); |
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 transform: scale(1.2)
on hover can cause layout shifts, especially in grid or flex layouts. Consider using a smaller scale value or a different effect to avoid disrupting the layout.
@media (min-width: 768px) { | ||
.catalog { | ||
grid-template-columns: repeat(3, min-content); | ||
} | ||
} |
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 media query for .catalog
is redundant because the same styling is already applied using the media-mixin
on line 15. Consider removing this block to avoid duplication and potential conflicts.
@@ -1,3 +1,16 @@ | |||
@import 'blocks/header'; | |||
@import 'blocks/mixins-variables-fonts'; |
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 importing mixins-variables-fonts
before any other styles that might use these variables or mixins. This ensures that all variables and mixins are defined before they are used in other styles.