Skip to content
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 code #4442

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ ___

❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:

- [DEMO LINK](https://<your_account>.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_search-bar-airbnb/report/html_report/)
- [DEMO LINK](https://Alex-redman.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://Alex-redman.github.io/layout_search-bar-airbnb/report/html_report/)

❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it.

Expand Down
45 changes: 28 additions & 17 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,40 @@
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
content="width=device-width, initial-scale=1.0"
/>
<meta
http-equiv="X-UA-Compatible"
content="ie=edge"
/>
<title>Document</title>
<link
rel="stylesheet"
href="style.css"
/>
<title>Search Bars</title>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<form
action="#"
data-qa="big"
>
<label>
<input
class="search-bar search-bar__big"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</label>
</form>
<form
action="#"
data-qa="small"
>
<label>
<input
class="search-bar search-bar__small"
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
</label>
</form>
</body>
</html>
82 changes: 81 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,81 @@
/* 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: bold;
}

.search-bar {
font-family: Avenir, sans-serif;
display: block;
width: 100%;
margin-top: 20px;
box-sizing: border-box;
box-shadow: 0 1px 8px 0 #3d4e611a;
border: 1px solid #e1e7ed;
border-radius: 5px;
color: #3d4e61;
}

.search-bar::placeholder {
color: #3d4e61;
}

/* #region big-bar */

.search-bar__big {
height: 70px;
font-size: 16px;
padding-left: 62px;
background-image: url(/src/images/Search.svg);
background-repeat: no-repeat;
background-size: 19px;
background-position: left 26px center;
background-color: #ffff;
}

.search-bar__big:hover {
box-shadow: 0 3px 8px 0 #3d4e6133;
}

.search-bar__big:focus {
border: 1px solid #e1e7ed;
box-shadow: 0 4px 4px 0 #00000040;
background:
url('./images/Search.svg') no-repeat 26px 25px/19px 19px,
linear-gradient(180deg, transparent, #f6f6f7);
text-shadow: 0 4px 4px 0 #00000040;
font-weight: bold;
}

/* #endregion */

/* #region small-bar */

.search-bar__small {
height: 42px;
font-size: 14px;
padding-left: 33px;
box-shadow: 0 1px 8px 0 #3d4e611a;
background: url(/src/images/Search.svg) no-repeat 13px center/11px 11px;
}

.search-bar__small:hover {
box-shadow: 0 3px 8px 0 #3d4e6133;
text-shadow: none;
}

.search-bar__small:focus {
border: 1px solid #e1e7ed;
text-shadow: none;
background:
url(/src/images/Search.svg) no-repeat 13px center/11px 11px,
linear-gradient(180deg, transparent, #f6f6f7);
}

/* #endregion */
Loading