-
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
search-bar ver 1.0.0 #4409
base: master
Are you sure you want to change the base?
search-bar ver 1.0.0 #4409
Changes from 1 commit
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 |
---|---|---|
|
@@ -17,16 +17,32 @@ | |
/> | ||
</head> | ||
<body> | ||
<input | ||
type="text" | ||
data-qa="keypress" | ||
placeholder="Try “Los Angeles“" | ||
/> | ||
<form class="search"> | ||
<div | ||
class="search search-bar_big" | ||
data-qa="big" | ||
> | ||
<input | ||
type="text" | ||
class="search-bar_big__form" | ||
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. try to simplify class name |
||
data-qa="keypress" | ||
placeholder="Try “Los Angeles“" | ||
/> | ||
</div> | ||
</form> | ||
|
||
<input | ||
type="text" | ||
data-qa="hover" | ||
placeholder="Try “Los Angeles“" | ||
/> | ||
<form class="search"> | ||
<div | ||
class="search search-bar_small" | ||
data-qa="small" | ||
> | ||
<input | ||
type="text" | ||
class="search-bar_small__form" | ||
data-qa="hover" | ||
placeholder="Try “Los Angeles“" | ||
/> | ||
</div> | ||
</form> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,125 @@ | ||
/* add styles here */ | ||
@font-face { | ||
font-family: Avenir; | ||
src: url(./fonts/Avenir-Book.ttf); | ||
font-weight: 300; | ||
} | ||
|
||
.search { | ||
margin-top: 20px; | ||
position: relative; | ||
} | ||
|
||
.search-bar_big { | ||
height: 68px; | ||
|
||
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. |
||
display: flex; | ||
position: relative; | ||
|
||
border: 1px solid rgba(225, 231, 237, 1); | ||
box-shadow: 0 1px 8px 0 #3d4e611a; | ||
border-radius: 4px; | ||
} | ||
|
||
.search-bar_big:hover { | ||
box-shadow: 0 3px 8px 0 rgba(61, 78, 97, 0.2); | ||
} | ||
|
||
.search-bar_big::after { | ||
background-image: url('./images/Search.svg'); | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
content: ''; | ||
position: absolute; | ||
height: 19px; | ||
Comment on lines
+17
to
+22
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. Those styles also are reapeated. |
||
width: 19px; | ||
top: 24px; | ||
left: 25px; | ||
} | ||
|
||
.search-bar_big__form { | ||
position: relative; | ||
left: 60px; | ||
line-height: 21px; | ||
|
||
border: none; | ||
|
||
font-family: Avenir, sans-serif; | ||
font-size: 16px; | ||
} | ||
|
||
.search-bar_big__form:focus { | ||
margin-top: 25px; | ||
max-height: 22px; | ||
|
||
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25); | ||
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%); | ||
|
||
font-weight: bold; | ||
} | ||
|
||
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. |
||
.search-bar_big__form:placeholder-shown { | ||
max-height: 22px; | ||
margin-top: 21px; | ||
} | ||
|
||
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. try to center it so it works regardless of search bar height |
||
.search-bar-big__form::placeholder { | ||
font-size: 25px; | ||
} | ||
|
||
input.search-bar_big__form { | ||
font-weight: 500; | ||
margin-bottom: 2px; | ||
} | ||
|
||
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. you don't need this |
||
.search-bar_small { | ||
height: 40px; | ||
margin-top: 8px; | ||
|
||
display: flex; | ||
position: relative; | ||
|
||
border: 1px solid rgba(225, 231, 237, 1); | ||
border-radius: 4px; | ||
box-shadow: 0 1px 8px 0 #3d4e611a; | ||
} | ||
|
||
.search-bar_small:hover { | ||
box-shadow: 0 3px 8px 0 rgba(61, 78, 97, 0.2); | ||
} | ||
|
||
.search-bar_small::after { | ||
background-image: url('./images/Search.svg'); | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
content: ''; | ||
width: 11px; | ||
height: 11px; | ||
position: absolute; | ||
top: 14px; | ||
left: 12px; | ||
} | ||
|
||
.search-bar_small__form { | ||
position: relative; | ||
left: 31px; | ||
line-height: 19px; | ||
border: none; | ||
font-family: Avenir, sans-serif; | ||
font-size: 14px; | ||
} | ||
|
||
.search-bar_small__form:focus { | ||
margin-top: 8px; | ||
max-height: 22px; | ||
|
||
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25); | ||
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%); | ||
font-weight: bold; | ||
} | ||
|
||
input.search-bar_small__form { | ||
font-weight: 500; | ||
margin-bottom: 2px; | ||
} |
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.
you don't need divs inside forms (remember to move data-qa to form)