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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
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://VolodymyrV7.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://VolodymyrV7.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
28 changes: 17 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,23 @@
href="style.css"
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<body class="body">
<form class="form">
<input
type="text"
class="big-input"
data-qa="big"
placeholder="Try “Los Angeles“"
/>
</form>

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

.body {
font-family: Avenir, sans-serif;
font-weight: 300;
font-size: 16px;
box-sizing: border-box;
}

.form {
width: 100%;
margin-top: 20px;
margin-bottom: 20px;
display: flex;
}

.big-input {
flex: 1;
padding-left: 26px;
gap: 17px;
height: 70px;
border-radius: 4px;
border: 1px solid #e1e7ed;
box-sizing: border-box;
box-shadow: 0 1px 8px 0 rgba(61, 78, 97, 0.1);
background: #fff url('./images/Search.svg') no-repeat left 10px center;
}

.small-input {
flex: 1;
padding-left: 13px;
gap: 9px;
height: 42px;
font-size: 14px;
border-radius: 4px;
border: 1px solid #e1e7ed;
box-sizing: border-box;
box-shadow: 0 1px 8px 0 rgba(61, 78, 97, 0.1);

Choose a reason for hiding this comment

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

this property is better to define in * selector and remove everywhere else

background: #fff url('./images/Search.svg') no-repeat left 5px center;
}

input:hover {
box-shadow: 0 3px 8px 0 rgba(61, 78, 97, 0.2);

Choose a reason for hiding this comment

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

do not add styles using tag selector

Instead, add a common input class to both inputs and add all shared styles using this class (instead of repeating them in small-input and biginput)

}

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

Choose a reason for hiding this comment

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

one of the reason tests fail might be overwritten by standard browser styles for placeholder

Add correct styles (font family - inherit, color, font weight) using pseudoelement:
.input::placeholder

https://developer.mozilla.org/en-US/docs/Web/CSS/::placeholder

outline: none;
}
Loading