-
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 #3866
add task solution #3866
Changes from 2 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 | ||||
---|---|---|---|---|---|---|
|
@@ -11,6 +11,35 @@ | |||||
<link rel="stylesheet" href="./style.css"> | ||||||
</head> | ||||||
<body> | ||||||
<h1>Search bar airbnb</h1> | ||||||
<form | ||||||
action="#" | ||||||
class="search-form search-form--big" | ||||||
data-qa="big" | ||||||
> | ||||||
<label class="search-form__label"> | ||||||
<span class="search-form__image search-form__image--big"></span> | ||||||
<input | ||||||
type="text" | ||||||
class="search-form__input search-form__input--big" | ||||||
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
you don't need --big modifier. |
||||||
placeholder="Try "Los Angeles"" | ||||||
data-qa="keypress" | ||||||
> | ||||||
</label> | ||||||
</form> | ||||||
|
||||||
<form | ||||||
action="#" | ||||||
class="search-form search-form--small" | ||||||
data-qa="small" | ||||||
> | ||||||
<label class="search-form__label"> | ||||||
<span class="search-form__image search-form__image--small"></span> | ||||||
<input | ||||||
type="text" | ||||||
class="search-form__input search-form__input--small" | ||||||
placeholder="Try "Los Angeles"" | ||||||
> | ||||||
</label> | ||||||
</form> | ||||||
</body> | ||||||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,109 @@ | ||
/* add styles here */ | ||
@font-face { | ||
font-family: Avenir; | ||
src: url(fonts/Avenir-Book.ttf); | ||
font-weight: 300; | ||
} | ||
|
||
@font-face { | ||
font-family: Avenir; | ||
src: url(fonts/Avenir-Heavy.ttf); | ||
font-weight: 800; | ||
} | ||
|
||
:root { | ||
--main-text-color: #3D4E61; | ||
|
||
} | ||
|
||
html { | ||
font-family: Avenir, Arial, sans-serif; | ||
font-size: 16px; | ||
color: var(--main-text-color); | ||
} | ||
|
||
input { | ||
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. Set it in search-form__input 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. I need to set color: var(--main-text-colot) in search-form__input ? 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. do not style by tags. move all styles for input to .search-form__input selector. |
||
padding: 0; | ||
outline: none; | ||
border: none; | ||
box-sizing: border-box; | ||
} | ||
|
||
|
||
.search-form { | ||
width: 100%; | ||
box-shadow: 0 1px 8px 0 rgba(61, 78, 97, 0.10); | ||
border-radius: 4px; | ||
} | ||
|
||
.search-form:hover { | ||
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25); | ||
} | ||
|
||
.search-form--big { | ||
height: 70px; | ||
margin: 20px auto; | ||
} | ||
|
||
.search-form--small { | ||
height: 42px; | ||
} | ||
|
||
.search-form__label { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
align-items: center; | ||
overflow: hidden; | ||
position: relative; | ||
} | ||
|
||
.search-form__image { | ||
background-image: url(images/Search.svg); | ||
background-size: cover; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
.search-form__image--big { | ||
width: 19px; | ||
height: 19px; | ||
position: absolute; | ||
top: 25px; | ||
left: 26px; | ||
} | ||
|
||
.search-form__image--small { | ||
position: absolute; | ||
width: 11px; | ||
height: 11px; | ||
top: 15px; | ||
left: 13px; | ||
} | ||
|
||
.search-form__input { | ||
height: 100%; | ||
width: 100%; | ||
border-radius: 4px; | ||
border: 1px solid #E1E7ED; | ||
background: #FFF; | ||
color: var(--main-text-color); | ||
font-family: inherit; | ||
} | ||
|
||
.search-form__input:focus { | ||
background: linear-gradient(180deg, #FFF 0%, #F6F6F7 100%); | ||
font-weight: 800; | ||
} | ||
|
||
.search-form__input::placeholder { | ||
color: var(--main-text-color); | ||
} | ||
|
||
.search-form__input--big { | ||
padding-left: 62px; | ||
font-size: 16px; | ||
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. move this styles in .search-form__input selector |
||
} | ||
|
||
.search-form__input--small { | ||
padding-left: 33px; | ||
font-size: 14px; | ||
} |
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.
Just set all styles in this selectors to search-form__input, you don`t need this additional span here and in the small form