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 task solution #3849

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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://ilyaivasyk.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://ilyaivasyk.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
37 changes: 35 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html lang="en" class="page">
<head>
<meta charset="UTF-8">
<meta
Expand All @@ -11,6 +11,39 @@
<link rel="stylesheet" href="./style.css">
</head>
<body>
<h1>Search bar airbnb</h1>
<div class="form">
<form
class="form__form-big form__form-big--icon"
action="/search"
method="GET"
data-qa="big"
>
<input
class="form__form-big__input form__form-big--size"
type="search"
id="search-input"
name="search"
placeholder="Try &quot;Los Angeles&quot;"
data-qa="keypress"
>
</form>

<form
class="form__form-sm
form__form-sm--icon"
action="/search"
method="GET"
data-qa="small"
>
<input
class="form__form-sm__input
form__form-sm--size"
type="search"
id="search-input-sm"
name="search"
placeholder="Try &quot;Los Angeles&quot;"
>
</form>
</div>
</body>
</html>
97 changes: 97 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,98 @@
/* add styles here */
@font-face {
font-family: Avenir-Book;
src: url("fonts/Avenir-Book.ttf") format("truetype");
font-weight: 300;
font-style: normal;
}

@font-face {
font-family: Avenir-Heavy;
src: url("fonts/Avenir-Heavy.ttf") format("truetype");
font-weight: 800;
font-style: normal;
}

:root {
--border: 1px solid #e1e7ed;
--box-shadow-input: 0 1px 8px 0 rgba(61, 78, 97, 0.10);
--box-shadow-input-efect: 0 3px 8px 0 rgba(61, 78, 97, 0.20);
}

body {
margin: 0;
}

input {
font-family: Avenir-Book, sans-serif;
border: none;
font-weight: 300;
}

.form {
padding: 0 10px;
}

.form__form-big {
margin: 20px 0;
}

.form__form-big, .form__form-sm {
position: relative;
}

.form__form-big__input, .form__form-sm__input {
width: 100%;
border: var(--border);
box-shadow: var(--box-shadow-input);
border-radius: 4px;
}

.form__form-big__input {
padding: 23px 60px;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This padding cut the image as you can see and that's one of the problems keeping your tests from being successful.

font-size: 16px;
}

.form__form-sm__input {
padding: 11px 31px;
font-size: 14px;
}

.form__form-big__input:focus, .form__form-sm__input:focus {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create one general form input class you don`t need to create two classes

font-family: Avenir-Heavy, sans-serif;
outline: none;
border: var(--border);
box-shadow: var(--box-shadow-input-efect);
}

.form__form-big__input:hover, .form__form-sm__input:hover {
box-shadow: var(--box-shadow-input-efect);
}

.form__form-big__input::placeholder, .form__form-sm__input::placeholder {
color: #3d4e61;
}

.form__form-big--icon::before {
position: absolute;
content: '';
background: url('images/Search.svg') center;
background-size: cover;
width: 19px;
height: 19px;
top: 50%;
left: 25px;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is wrong values please double check the design

transform: translateY(-50%);
}

.form__form-sm--icon::before {
position: absolute;
content: '';
background: url('images/Search.svg')center;
background-size: cover;
width: 11px;
height: 11px;
top: 50%;
left: 12px;
transform: translateY(-50%);
}