-
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 a HTML markup #4822
base: master
Are you sure you want to change the base?
add a HTML markup #4822
Conversation
yuurex
commented
Oct 7, 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 on organizing your HTML structure and keeping your SCSS file consistent with the basic code style rules! 👍 Remember to always use variables for colors in SCSS to enhance maintainability, and stick to class selectors for styling. Keep an eye on the BEM methodology for class names and ensure you compile SCSS to CSS for browser compatibility. Keep up the good work, and consider these tips for your next project for even cleaner and more efficient code! 💻✨
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
src/index.html
Outdated
<p>Reviews: 5</p> | ||
</div> | ||
|
||
<div class="price"> |
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 'price' block should be an element of 'card', so it should follow the BEM naming convention. For example, 'card__price' instead of just 'price'.
src/index.html
Outdated
<p>Price:</p> | ||
<p>$2,199</p> |
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.
Nested elements inside the 'price' block should have class names that reflect their role as elements of the 'price' block, following the BEM methodology (e.g., 'card__price-label' and 'card__price-value').
<p>$2,199</p> | ||
</div> | ||
|
||
<a |
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.
According to the code style rules, it's better to avoid using id selectors and use class selectors instead for styling. Make sure that the 'href' attribute does not contain '#', unless you are linking to an existing id.
src/styles/index.scss
Outdated
@@ -1,3 +1,6 @@ | |||
body { | |||
margin: 0; | |||
background-color: antiquewhite; |
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 a variable for colors in SCSS for better maintainability and reusability. For example: $primary-background: antiquewhite;
and then use background-color: $primary-background;
.
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!
<h1 class="card__product-name"> | ||
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.
<h1 class="card__product-name"> | |
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | |
</h1> | |
<h2 class="card__product-name"> | |
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | |
</h2> |
It's expected to have multiple cards on the page. However, the h1
tag should be used just once per page
<div class="card__stars"> | ||
<div class="card__star"></div> | ||
<div class="card__star"></div> | ||
<div class="card__star"></div> | ||
<div class="card__star"></div> | ||
<div class="card__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.
<div class="card__stars"> | |
<div class="card__star"></div> | |
<div class="card__star"></div> | |
<div class="card__star"></div> | |
<div class="card__star"></div> | |
<div class="card__star"></div> | |
<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> |
Consider using classes from the previous task
src/styles/index.scss
Outdated
} | ||
|
||
&__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 number of active stars should depend on the class with the modifier. Consider using classes from the previous task for styling
src/styles/index.scss
Outdated
font-weight: 700; | ||
text-align: center; | ||
border: solid #{$blue-accent} 1px; | ||
background-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.
Consider using variable for repeating color