Skip to content

Commit

Permalink
add solution
Browse files Browse the repository at this point in the history
  • Loading branch information
berezandiana committed Oct 5, 2024
1 parent b64f3c5 commit a7de73e
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 13 deletions.
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://berezandiana.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://berezandiana.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
34 changes: 24 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,30 @@
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<form
class="search-bar search-bar--large"
data-qa="big"
>
<div class="search-bar__icon search-bar__icon--large"></div>
<input
class="search-bar__input search-bar__input--large"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</form>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<form
class="search-bar search-bar--small"
data-qa="small"
>
<div class="search-bar__icon search-bar__icon--small"></div>
<input
class="search-bar__input search-bar__input--small"
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
</form>
</body>
</html>
85 changes: 84 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,84 @@
/* 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;
}

body {
padding: 0;
}

.search-bar {
margin: 20px 0;
}

.search-bar__input {
box-sizing: border-box;
width: 100%;
height: 70px;
padding-left: 62px;
font-family: Avenir, sans-serif;
font-size: 16px;
color: #3d4e61;
border: 1px solid #e1e7ed;
border-radius: 4px;
background-image: url(./images/Search.svg);
background-repeat: no-repeat;
background-size: 19px;
background-position: 25px center;
box-shadow: 0 1px 8px rgba(61, 78, 97, 0.1);
}

.search-bar__input--small {
background-size: 11px;
background-position: 12px center;
height: 42px;
font-size: 14px;
font-weight: 400;
padding-left: 33px;
}

.search-bar__input::placeholder {
color: #3d4e61;
font-weight: 300;
font-size: 16px;
}

.search-bar__input--small::placeholder {
font-weight: 400;
font-size: 14px;
}

.search-bar__input:hover {
box-shadow: 0 4px 4px #00000040;
}

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

.search-bar__input:focus {
border: 1px solid #e1e7ed;
text-shadow: 0 4px 4px #00000040;
box-shadow: 0 4px 4px #00000040;
font-weight: bold;
color: #3d4e61;
background: url(./images/Search.svg),
linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
background-repeat: no-repeat, no-repeat;
background-size: 19px, auto;
background-position:
25px center,
center;
}

.search-bar__input--small:focus {
background-size: 11px;
background-position: 12px center;
}

0 comments on commit a7de73e

Please sign in to comment.