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

make searc-bar #4698

Open
wants to merge 2 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
12 changes: 6 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ ___

❗️ 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://kepchuk1234.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://kepchuk1234.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.

- [ ] Icon implemented using background-image CSS property
- [ ] Inputs are written inside of 'form' tag with correctly passed attributes
- [ ] All `Typical Mistakes` from `BEM` lesson theory are checked.
- [ ] Code follows all the [Code Style Rules ❗️](./checklist.md)
- [x] Icon implemented using background-image CSS property
- [x] Inputs are written inside of 'form' tag with correctly passed attributes
- [x] All `Typical Mistakes` from `BEM` lesson theory are checked.
- [x] Code follows all the [Code Style Rules ❗️](./checklist.md)
3 changes: 3 additions & 0 deletions src/images/search-small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 27 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,33 @@
href="style.css"
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<body class="page">
<form
class="form"
action="index.html"
method="post"
data-qa="big"
>
<input
class="form__search"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</form>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<form
class="form"
action="index.html"
method="post"
data-qa="small"
>
<input
class="form__search form__search--small"
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
</form>
</body>
</html>
89 changes: 89 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,90 @@
/* add styles here */
@font-face {
font-family: Avenir;
src: url(./fonts/Avenir-Book.ttf);
}

@font-face {
font-family: Avenir;
src: url(./fonts/Avenir-Heavy.ttf);
font-weight: bold;
}

.page {
margin-top: 0;
color: #3d4e61;
}

.form {
display: flex;
flex-direction: column;
margin-top: 20px;
padding: 0;
}

.form__search {
display: flex;
box-sizing: border-box;
padding-left: 62px;
height: 70px;
border: 1px solid #e1e7ed;
border-radius: 4px;
box-shadow: 0 1px 8px 0 #3d4e611a;

background-image: url(./images/Search.svg);
background-repeat: no-repeat;
background-position: 25px 24px;

font-family: Avenir, sans-serif;
}

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

.form__search:focus {
box-shadow: 0 4px 4px 0 #00000040;
outline: none;

font-weight: bold;
color: #3d4e61;
text-shadow: 0 4px 4px 0 #00000040;
}

.form__search::placeholder {
position: absolute;
top: 50%;
transform: translateY(-50%);
font-weight: normal;
text-shadow: none;
font-size: 16px;
line-height: 22px;
color: #3d4e61;
font-family: Avenir, sans-serif;
}

.form__search--small {
height: 42px;
padding-left: 33px;

background-image: url(./images/search-small.svg);
background-repeat: no-repeat;
background-position: 12px 14px;

font-size: 14px;
}

.form__search--small::placeholder {
/* text-shadow: 0 4px 4px 0 #00000040; */
font-size: 14px;
}

.form__search--small:hover::placeholder {
text-shadow: none;
font-size: 14px;
}

.form__search--small:focus {
text-shadow: none;
font-size: 14px;
}
Loading