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

Search Bar solution #4426

Open
wants to merge 1 commit 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@mate-academy/backstop-config": "latest",
"@mate-academy/bemlint": "latest",
"@mate-academy/linthtml-config": "latest",
"@mate-academy/scripts": "^1.7.3",
"@mate-academy/scripts": "^1.9.1",
"@mate-academy/stylelint-config": "latest",
"backstopjs": "6.2.2",
"jest": "^29.7.0",
Expand Down
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://modeltoIT.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://modeltoIT.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)
36 changes: 26 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,32 @@
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<form
action="#"
method="get"
class="search"
data-qa="big"
>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
class="input input__big"
/>
</form>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<form
action="#"
method="get"
class="search"
data-qa="small"
>
<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
class="input input__small"
/>
</form>
</body>
</html>
86 changes: 85 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,85 @@
/* add styles here */
@font-face {
font-family: Avenir-Book, sans-serif;
src: url(./fonts/Avenir-Heavy.ttf);
}

@font-face {
font-family: Avenir-Heavy, sans-serif;
src: url(./fonts/Avenir-Heavy.ttf);
}

html {
font-family: Avenir-Book, sans-serif;
font-size: 10px;
}

* {
box-sizing: border-box;
}

.search {
margin-top: 2rem;
}

.input {
width: 100%;
font-family: inherit;
background-image: url('images/Search.svg');
background-repeat: no-repeat;
color: #3d4e61;
font-weight: 300;
border: 1px solid rgba(225, 231, 237, 1);
border-radius: 0.3rem;
filter: drop-shadow(0 1px 8px rgba(61, 78, 97, 0.1));
}

.input::placeholder {
color: #3d4e61;
}

.input__big {
height: 7rem;
font-size: 1.6rem;
line-height: 2.19rem;
background-position: 2.6rem center;
padding: 2.6rem 2.6rem 2.6rem 6.2rem;
}

.input:focus {
font-weight: 900;
outline: none;
}

.input__big:focus {
background:
no-repeat 2.6rem center url('images/Search.svg'),
linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
}

.input__big::placeholder {
font-weight: 300;
}

.input__small {
height: 4.2rem;
font-size: 1.4rem;
line-height: 1.91rem;
background-position: 1.2rem center;
background-size: 1.1rem;
padding: 1.2rem 1.2rem 1.2rem 3.3rem;
}

.input__small::placeholder {
font-weight: 400;
}

.input__big:hover,
.input__small:hover {
filter: drop-shadow(0 3px 8px rgba(61, 78, 97, 0.2));
}

.input__small:focus {
background:
no-repeat 1.2rem center/1.1rem url('images/Search.svg'),
linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
}
Loading