-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Solution #5031
base: master
Are you sure you want to change the base?
Solution #5031
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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
.card { | ||
max-width: 200px; | ||
min-height: 408px; | ||
background-color: #fff; | ||
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 SCSS variables for the background color ( |
||
border: 1px solid #f3f3f3; | ||
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 border color ( |
||
border-radius: 5px; | ||
padding: 32px 16px 16px; | ||
display: flex; | ||
flex-direction: column; | ||
|
||
&__img { | ||
width: 160px; | ||
height: 134px; | ||
display: block; | ||
margin: 0 auto; | ||
} | ||
|
||
&__title { | ||
font-weight: 500; | ||
font-size: 12px; | ||
line-height: 18px; | ||
color: #060b35; | ||
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 color ( |
||
margin-top: 40px; | ||
margin-bottom: 4px; | ||
} | ||
|
||
&__product-code { | ||
font-weight: 400; | ||
font-size: 10px; | ||
line-height: 14px; | ||
color: #616070; | ||
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 color ( |
||
} | ||
|
||
&__reviews { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-top: 16px; | ||
} | ||
|
||
&__reviews-count { | ||
font-weight: 400; | ||
font-size: 10px; | ||
line-height: 14px; | ||
color: #060b35; | ||
margin: 0; | ||
} | ||
|
||
&__price { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-top: 24px; | ||
margin-bottom: 16px; | ||
} | ||
|
||
&__price-text { | ||
font-weight: 400; | ||
font-size: 12px; | ||
line-height: 18px; | ||
color: #616070; | ||
margin: 0; | ||
} | ||
|
||
&__price-value { | ||
font-weight: 700; | ||
font-size: 16px; | ||
line-height: 18px; | ||
color: #060b35; | ||
margin: 0; | ||
} | ||
|
||
&__buy-link { | ||
font-weight: 700; | ||
font-size: 14px; | ||
width: 100%; | ||
height: 40px; | ||
margin: 0; | ||
color: #fff; | ||
background-color: #00acdc; | ||
Comment on lines
+79
to
+80
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 color ( |
||
border-radius: 5px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
text-transform: uppercase; | ||
text-decoration: none; | ||
|
||
&:hover { | ||
color: #00acdc; | ||
background-color: #fff; | ||
border: 1px solid #00acdc; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
body { | ||
@use './card'; | ||
@use './stars'; | ||
|
||
Comment on lines
+1
to
+2
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 importing a separate SCSS file for variables to ensure that all main values are consistent and easily maintainable across different style files. |
||
* { | ||
font-family: Roboto, sans-serif; | ||
box-sizing: border-box; | ||
margin: 0; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.stars { | ||
display: flex; | ||
flex-direction: row; | ||
|
||
&__star { | ||
width: 16px; | ||
height: 16px; | ||
Comment on lines
+6
to
+7
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 defining SCSS variables for the width and height ( |
||
margin-right: 4px; | ||
background-image: url(../images/star.svg); | ||
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 image path ( |
||
background-repeat: no-repeat; | ||
background-position: center; | ||
|
||
&:last-child { | ||
margin: 0; | ||
} | ||
|
||
&:nth-child(-n + 4) { | ||
background-image: url(../images/star-active.svg); | ||
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. Similarly, consider defining a variable for the active star image path ( |
||
} | ||
} | ||
} |
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 should point to a.css
file instead of a.scss
file. Ensure that the SCSS is compiled to CSS and update the link accordingly.