-
Notifications
You must be signed in to change notification settings - Fork 4k
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 #4481
base: master
Are you sure you want to change the base?
add task solution #4481
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 |
---|---|---|
@@ -1 +1,119 @@ | ||
/* add styles here */ | ||
@font-face { | ||
font-family: Avenir; | ||
font-weight: 300; | ||
font-style: normal; | ||
src: url('./fonts/Avenir-Book.ttf') format(truetype); | ||
} | ||
|
||
@font-face { | ||
font-family: Avenir; | ||
font-weight: 600; | ||
font-style: normal; | ||
src: url(./fonts/Avenir-Heavy.ttf) format(truetype); | ||
} | ||
|
||
body { | ||
padding: 0; | ||
box-sizing: border-box; | ||
font-family: Avenir, sans-serif; | ||
font-size: 16px; | ||
} | ||
|
||
.search-bar { | ||
display: flex; | ||
justify-content: center; | ||
margin: 20px auto 0; | ||
} | ||
|
||
.search-bar_big { | ||
box-sizing: border-box; | ||
width: 100%; | ||
height: 70px; | ||
} | ||
|
||
.search-bar_small { | ||
width: 100%; | ||
height: 42px; | ||
} | ||
|
||
.search-bar__label { | ||
position: relative; | ||
display: block; | ||
width: 100%; | ||
} | ||
|
||
.search-bar__label::after { | ||
position: absolute; | ||
content: ''; | ||
display: block; | ||
} | ||
|
||
.search-bar__label_big::after { | ||
background-image: url(./images/Search.svg); | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
width: 19px; | ||
height: 19px; | ||
top: 25px; | ||
left: 26px; | ||
} | ||
|
||
.search-bar__label_small::after { | ||
background-image: url(./images/Search.svg); | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
width: 11px; | ||
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. these 3 lines could've been comprised in line 45 (.search-bar__label::after) as they are common for both |
||
height: 11px; | ||
top: 15px; | ||
left: 13px; | ||
} | ||
|
||
.search-bar__input { | ||
box-sizing: border-box; | ||
width: 100%; | ||
height: 100%; | ||
border: 1px solid #e1e7ed; | ||
border-radius: 4px; | ||
color: #3d4e61; | ||
font-weight: 300; | ||
font-family: inherit; | ||
box-shadow: 0 1px 8px rgba(61, 78, 97, 0.1); | ||
outline: none; | ||
} | ||
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. when we have lots of css properties (7+) in a single selector, it's a good idea to separate some of them semantically using line breaks |
||
|
||
.search-bar__input:hover { | ||
box-shadow: 0 3px 8px rgba(61, 78, 97, 0.2); | ||
} | ||
|
||
.search-bar__input_big { | ||
padding-left: 62px; | ||
font-size: 16px; | ||
line-height: 22px; | ||
} | ||
|
||
.search-bar__input_small { | ||
padding-left: 33px; | ||
font-size: 14px; | ||
line-height: 19px; | ||
} | ||
|
||
.search-bar__input::placeholder { | ||
color: inherit; | ||
font-weight: 300; | ||
} | ||
|
||
.search-bar__input_big::placeholder { | ||
font-size: 16px; | ||
line-height: 22px; | ||
} | ||
|
||
.search-bar__input_small::placeholder { | ||
font-size: 14px; | ||
line-height: 22px; | ||
} | ||
|
||
.search-bar__input:focus { | ||
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%); | ||
border-radius: 3px; | ||
font-weight: 600; | ||
} |
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.
nice BEM modifiers!