-
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -13,6 +13,39 @@ | |||||||||||||||||||||||||
/> | ||||||||||||||||||||||||||
</head> | ||||||||||||||||||||||||||
<body> | ||||||||||||||||||||||||||
<h1>Product cards</h1> | ||||||||||||||||||||||||||
<div | ||||||||||||||||||||||||||
class="card" | ||||||||||||||||||||||||||
data-qa="card" | ||||||||||||||||||||||||||
> | ||||||||||||||||||||||||||
<h1 class="card__product-name"> | ||||||||||||||||||||||||||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||||||||||||||||||||||||||
</h1> | ||||||||||||||||||||||||||
<h3 class="card__product-id">Product code: 195434</h3> | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
<div class="card__reviews"> | ||||||||||||||||||||||||||
<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> | ||||||||||||||||||||||||||
Comment on lines
+41
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Consider using classes from the previous task |
||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
<p>Reviews: 5</p> | ||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
<div class="price"> | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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'. |
||||||||||||||||||||||||||
<p>Price:</p> | ||||||||||||||||||||||||||
<p>$2,199</p> | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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'). |
||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
<a | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||||||||||||||||||||||||||
href="#" | ||||||||||||||||||||||||||
class="card__button" | ||||||||||||||||||||||||||
data-qa="hover" | ||||||||||||||||||||||||||
> | ||||||||||||||||||||||||||
BUY | ||||||||||||||||||||||||||
</a> | ||||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||||
</body> | ||||||||||||||||||||||||||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
body { | ||
margin: 0; | ||
background-color: antiquewhite; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: |
||
} | ||
|
||
|
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.
It's expected to have multiple cards on the page. However, the
h1
tag should be used just once per page