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 #4735

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -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://anhrytsan.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://anhrytsan.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.

27 changes: 17 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -17,16 +17,23 @@
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<form
action="#"
class="form"
>
Comment on lines +20 to +23

Choose a reason for hiding this comment

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

The <form> tag should not be self-closing. It should have a separate closing tag </form> instead of using a self-closing syntax. This is important for proper HTML structure and to ensure that the form elements are correctly nested within the form.

Comment on lines +20 to +23

Choose a reason for hiding this comment

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

The <form> tag is incorrectly self-closing. According to HTML specifications, the <form> tag should have a separate closing tag </form>. Please update this to maintain proper HTML structure.

<input
type="text"
data-qa="big"
placeholder="Try “Los Angeles“"
class="form__input form__input--first"
/>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<input
type="text"
data-qa="small"
placeholder="Try “Los Angeles“"
class="form__input form__input--second"
/>
</form>
</body>
</html>
83 changes: 82 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,82 @@
/* add styles here */
@font-face {
font-family: Avenir;
src: url(fonts/Avenir-Book.ttf);
font-weight: 300;
font-style: normal;
}

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

body {
margin-top: 0;
font-family: Avenir, sans-serif;
}

.form {
display: flex;
flex-direction: column;
color: #3d4e61;
}
Comment on lines +19 to +23

Choose a reason for hiding this comment

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

The .form class should include styles to ensure the search bars stretch the full width of their container. Consider adding width: 100%; to the .form class or the input elements to achieve this.


.form__input {
background-image: url(images/Search.svg);
background-repeat: no-repeat;
background-position: 25px center;
background-size: 19px;
padding-left: 62px;
box-sizing: border-box;
border: 1px solid #e1e7ed;
border-radius: 4px;
box-shadow: 0 1px 8px rgba(61, 78, 97, 0.1);
font-weight: 300;
font-family: inherit;
outline: none;
}

.form__input::placeholder {
color: #3d4e61;
font-weight: 300;
line-height: 21.86px;
}

.form__input--first {
height: 70px;
margin: 20px 0;
font-size: 16px;
}
Comment on lines +46 to +50

Choose a reason for hiding this comment

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

To maintain a 20px gap between the search bars, you should adjust the margin or padding. Currently, the .form__input--first has a margin: 20px 0;, which might not be sufficient to ensure the required gap between the two input fields.


.form__input--second {
height: 42px;
font-size: 14px;
padding-left: 33px;
background-position: 12px center;
background-size: 11px;
}

.form__input:focus {
outline: none;
box-shadow: 0 3px 8px rgba(61, 78, 97, 0.2);
border-radius: 3px;
border-color: #3d4e61;
background-image: url(images/Search.svg),
linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
background-repeat: no-repeat;
background-size: 19px, 100%;
font-weight: 600;
}

.form__input--second:focus {
background-position:
13px center,
0 0;
background-size: 11px, 100%;
box-shadow: none;
}

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