-
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 #4910
base: master
Are you sure you want to change the base?
add task solution #4910
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,87 @@ | ||
.card { | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
width: 200px; | ||
padding: 32px 16px 16px; | ||
border: 1px solid #f3f3f3; | ||
border-radius: $border-radius; | ||
background-color: #fff; | ||
|
||
&__image { | ||
width: 160px; | ||
height: 134px; | ||
margin-bottom: 40px; | ||
} | ||
|
||
&__title { | ||
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 naming convention suggests using a single underscore for element names, like |
||
font-size: 12px; | ||
line-height: 18px; | ||
font-weight: 500; | ||
color: $main-text-color; | ||
margin-bottom: 4px; | ||
} | ||
|
||
&__product-code { | ||
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 naming convention suggests using a single underscore for element names, like |
||
@include text-secondary; | ||
|
||
margin-bottom: 16px; | ||
} | ||
|
||
&__reviews { | ||
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 naming convention suggests using a single underscore for element names, like |
||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
margin-bottom: 24px; | ||
} | ||
|
||
&__reviews-count { | ||
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 naming convention suggests using a single underscore for element names, like |
||
@include text-secondary; | ||
|
||
text-align: right; | ||
} | ||
|
||
&__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 BEM naming convention suggests using a single underscore for element names, like |
||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
margin-bottom: 16px; | ||
} | ||
|
||
&__price-text { | ||
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 naming convention suggests using a single underscore for element names, like |
||
font-size: 14px; | ||
line-height: 18px; | ||
font-weight: 400; | ||
} | ||
|
||
&__price-value { | ||
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 naming convention suggests using a single underscore for element names, like |
||
font-size: 16px; | ||
line-height: 18px; | ||
font-weight: 700; | ||
color: $main-text-color; | ||
} | ||
|
||
&__button { | ||
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 naming convention suggests using a single underscore for element names, like |
||
box-sizing: border-box; | ||
height: 40px; | ||
display: flex; | ||
border-radius: $border-radius; | ||
border: 1px solid $accent-color; | ||
align-items: center; | ||
justify-content: center; | ||
text-transform: uppercase; | ||
text-decoration: none; | ||
color: #fff; | ||
background-color: $accent-color; | ||
font-size: 14px; | ||
line-height: 16px; | ||
font-weight: 700; | ||
transition: all 0.2s ease; | ||
} | ||
|
||
&__button:hover { | ||
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 naming convention suggests using a single underscore for element names, like |
||
background-color: #fff; | ||
color: $accent-color; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.stars { | ||
display: flex; | ||
} | ||
|
||
.stars__star { | ||
height: 16px; | ||
width: 16px; | ||
background-image: url('../images/star.svg'); | ||
background-repeat: no-repeat; | ||
background-position: 50%; | ||
margin-right: 4px; | ||
} | ||
|
||
.stars--1 .stars__star:nth-child(1), | ||
.stars--2 .stars__star:nth-child(-n + 2), | ||
.stars--3 .stars__star:nth-child(-n + 3), | ||
.stars--4 .stars__star:nth-child(-n + 4), | ||
.stars--5 .stars__star:nth-child(-n + 5) { | ||
background-image: url('../images/star-active.svg'); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
@import './utils/variables'; | ||
@import './utils/mixins'; | ||
@import 'blocks/card'; | ||
@import 'blocks/stars'; | ||
|
||
body { | ||
margin: 0; | ||
padding: 50px; | ||
background-color: #f0f0f0; | ||
font-family: Roboto, Arial, sans-serif; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@mixin text-secondary() { | ||
font-size: 10px; | ||
line-height: 14px; | ||
font-weight: 400; | ||
color: $secondary-text-color; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$card-width: 200px; | ||
$card-padding: 16px; | ||
$border-radius: 5px; | ||
$main-text-color: #060b35; | ||
$secondary-text-color: #616070; | ||
$accent-color: #00acdc; |
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 BEM naming convention suggests using a single underscore for element names, like
&-image
instead of&__image
. Consider changing this to maintain consistency with BEM.