-
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 #4815
base: master
Are you sure you want to change the base?
Develop #4815
Changes from all commits
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 |
---|---|---|
|
@@ -7,12 +7,63 @@ | |
content="width=device-width, initial-scale=1.0" | ||
/> | ||
<title>Product cards</title> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.googleapis.com" | ||
/> | ||
<link | ||
rel="preconnect" | ||
href="https://fonts.gstatic.com" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="./styles/index.scss" | ||
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 |
||
/> | ||
</head> | ||
<body> | ||
<h1>Product cards</h1> | ||
<header class="header"> | ||
<div | ||
class="card" | ||
data-qa="card" | ||
> | ||
<a | ||
href="#" | ||
class="images" | ||
></a> | ||
Comment on lines
+35
to
+36
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. Empty links are not allowed. If this is supposed to be an image container, you should include an |
||
<h3 class="card__title"> | ||
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A) | ||
</h3> | ||
<p class="card__sudtitle">Product code: 195434</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. There is a typo in the class name |
||
|
||
<div class="stars-container"> | ||
<div class="stars stars--0"> | ||
<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="stars-container__reviews">Reviews: 5</p> | ||
</div> | ||
|
||
<div class="card__price-container"> | ||
<p class="card__price-label">Price:</p> | ||
<p class="card__money">$2,199</p> | ||
</div> | ||
<div> | ||
<a | ||
href="#" | ||
class="card__buy-button" | ||
data-qa="hover" | ||
> | ||
BUY | ||
</a> | ||
</div> | ||
</div> | ||
</header> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
.card { | ||
width: 200px; | ||
border: 1px solid white; | ||
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, the border color should be consistent with the design. If |
||
box-sizing: border-box; | ||
background-color: #fff; | ||
border-radius: 5px; | ||
padding: 32px 16px 16px; | ||
|
||
&__title { | ||
margin: 40px 0 0; | ||
font-weight: 500; | ||
font-size: 12px; | ||
line-height: 18px; | ||
color: #060b35; | ||
} | ||
|
||
&__sudtitle { | ||
margin: 4px 0 0; | ||
padding-top: 0; | ||
font-weight: 400; | ||
line-height: 14px; | ||
color: #616070; | ||
font-size: 10px; | ||
} | ||
Comment on lines
+17
to
+24
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. It appears there is a typo in the BEM element name |
||
|
||
&__price-container { | ||
margin-top: 24px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
&__price-label { | ||
margin: 0; | ||
color: #616070; | ||
font-size: 12px; | ||
line-height: 18px; | ||
} | ||
|
||
&__money { | ||
margin: 0; | ||
font-weight: 700; | ||
font-size: 16px; | ||
line-height: 18px; | ||
color: #060b35; | ||
} | ||
|
||
&__buy-button { | ||
margin: 16px 0 0; | ||
background-color: #00acdc; | ||
position: relative; | ||
width: 166px; | ||
height: 40px; | ||
border-radius: 5px; | ||
color: #fff; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
text-align: center; | ||
font-weight: 700; | ||
font-size: 14px; | ||
line-height: 16px; | ||
text-decoration: none; | ||
box-sizing: border-box; | ||
&:hover { | ||
background: #fff; | ||
color: #00acdc; | ||
border: 1px solid #00acdc; | ||
Comment on lines
+48
to
+68
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. Ensure that the hover state for the |
||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.images { | ||
background-image: url(../images/imac.jpeg); | ||
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 ❗️, for SCSS files, it is recommended to use variables for colors, fonts, and other static values. Consider storing image paths as variables at the top of your SCSS files for easier maintenance and reusability. |
||
background-repeat: no-repeat; | ||
background-size: cover; | ||
display: block; | ||
width: 160px; | ||
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. this style looks redundant |
||
height: 134px; | ||
margin: 0 3px; | ||
} | ||
Comment on lines
+1
to
+9
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 class name |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
body { | ||
@import '../styles/card'; | ||
@import '../styles/image'; | ||
@import '../styles/starts'; | ||
|
||
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, when importing several files, each import statement should be on a new line and should not have a file extension. The import statements here are correctly placed on separate lines, but the file extensions are missing. Please add '.scss' to the end of each import path. |
||
html { | ||
margin: 0; | ||
padding: 0; | ||
font-family: Roboto, Arial, sans-serif; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.stars { | ||
display: flex; | ||
|
||
&__star { | ||
width: 16px; | ||
height: 16px; | ||
background-image: url(../images/star.svg); | ||
background-position: center; | ||
margin-right: 4px; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
&-container { | ||
display: flex; | ||
justify-content: space-between; | ||
margin-top: 16px; | ||
align-items: center; | ||
} | ||
|
||
&-container__reviews { | ||
font-weight: 400; | ||
font-size: 10px; | ||
margin: 2px 0 0; | ||
color: #060b35; | ||
} | ||
|
||
&--0 { | ||
.stars__star:nth-child(-n + 4) { | ||
background-image: url(../images/star-active.svg); /* Active star image */ | ||
} | ||
Comment on lines
+27
to
+30
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 BEM modifier |
||
} | ||
} |
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 ❗️, you should combine the
preconnect
link tags into one. You can specify multiplehref
attributes separated by a comma.