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

first trial search bar #4463

Open
wants to merge 3 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://italomagno.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://italomagno.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)
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
action="#"
class="form"
data-qa="big"
>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
class="form__searchBar form__searchBar--big"
/>
</form>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<form
action="#"
data-qa="small"
class="form"
>
<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
class="form__searchBar form__searchBar--small"
/>
</form>
</body>
</html>
113 changes: 112 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,112 @@
/* add styles here */
* {
box-sizing: border-box;
}

@font-face {
font-family: Avenir;
src: url(./fonts/Avenir.ttc);
font-weight: 300;
}

@font-face {
font-family: AvenirBook;
src: url(./fonts/Avenir-Book.ttf);
font-weight: 300;
}

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

body {
--text-color: #3d4e61;
--border-color: #e1e7ed;
--icon-color: #687c94;
--shadow: rgba(61, 78, 97, 0.1);

font-family: Avenir, sans-serif;
}

/* form big start */
.form {
margin-top: 20px;
}

.form__searchBar {
width: 100%;
border-radius: 3px;
line-height: 21.86px;
border: 1px solid var(--border-color);
position: relative;
}

.form__searchBar::placeholder {
color: var(--text-color);
font-family: Avenir, sans-serif;
}

.form__searchBar--big {
height: 70px;
padding-left: 62px;
font-size: 16px;
border-radius: 3px;
line-height: 21.86px;

background-position: 26px center;
background-size: 19px 19px;
background-image: url('./images/Search.svg');
background-repeat: no-repeat;
}

.form__searchBar--big:hover {
box-shadow: 0 3px 8px 0 rgba(61, 78, 97, 0.2);
}

.form__searchBar--big:focus {
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%);

font-family: AvenirHeavy, sans-serif;

text-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
box-shadow: 0 4px 4px 0 var(--shadow);

background-size: 19px 19px;
background-position: 13px center;
background-image: url('./images/Search.svg');
background-repeat: no-repeat;
}

/* form big end */

.form__searchBar--small {
height: 42px;
line-height: 19.12px;
padding-left: 33px;
border-radius: 4px;
font-size: 14px;

background-size: 11px 11px;
background-position: 13px center;
background-image: url('./images/Search.svg');
box-shadow: 0 1px 8px rgba(61, 78, 97, 0.1);
background-repeat: no-repeat;
}

.form__searchBar--small:hover {
text-shadow: none;
box-shadow: 0 3px 8px 0 rgba(61, 78, 97, 0.2);
}

.form__searchBar--small:focus {
font-family: AvenirHeavy, sans-serif;
text-shadow: none;
border: 1px solid var(--text-color);
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%);

background-size: 11px 11px;
background-position: 13px center;
background-image: url('./images/Search.svg');
background-repeat: no-repeat;
}
Loading