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

Develop #4557

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Develop #4557

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://nikovod.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://nikovod.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)
37 changes: 26 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,32 @@
href="style.css"
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<body class="body">
<form
action="#"
method="post"
class="form form--big"
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
method="post"
class="form form--small"
data-qa="small"
>
<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
class="input input--small"
/>
</form>
</body>
</html>
87 changes: 86 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,86 @@
/* add styles here */
@font-face {
font-family: Avenir-Book;
src: url(./fonts/Avenir-Book.ttf);
}

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

body {
margin: 0 8px;

Choose a reason for hiding this comment

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

The margin property should be consistent with the checklist recommendation to avoid potential margin collapse. Consider using only top or bottom margin, but not both.

Choose a reason for hiding this comment

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

Consider using only top or bottom margin to avoid potential margin collapse. The checklist suggests being consistent with your margins.

Copy link
Author

Choose a reason for hiding this comment

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

I have couple comments here:

  1. There is nothing stated in the task to set horizontal margins, I had to ask mentor to understand why tests were failing and he suggested putting "margin: 0 10px", but at 10px tests still were failing. I had to find the correct margin to comply the tests. I believe this point should be added to task description or tests should be updated

  2. Why the bot says it's incorrect margins? I was suggested by mentor to set margins this way?

Copy link
Author

Choose a reason for hiding this comment

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

@etojeDenys please check these questions

--big-box-shadow: 0 4px 4px 0 #00000040;
--small-box-shadow: 0 3px 8px 0 #3d4e6133;
}

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

.input {
width: 100%;
background: url('./images/Search.svg') no-repeat;
box-sizing: border-box;
background-size: contain;
border-radius: 4px;
border: 1px solid #e1e7ed;
font-weight: 300;
box-shadow: 0 1px 8px 0 #3d4e611a;
font-family: Avenir-Heavy, sans-serif;
color: #3d4e61;

Choose a reason for hiding this comment

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

It's a good practice to provide fallback fonts. Consider adding a generic font family like 'sans-serif' as a fallback for 'Avenir-Heavy'.

}

.input::placeholder {
font-family: Avenir-Book, sans-serif;
color: inherit;

Choose a reason for hiding this comment

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

Consider adding a generic font family like 'sans-serif' as a fallback for 'Avenir-Book' to ensure proper rendering if the custom font fails to load.

font-weight: inherit;
text-shadow: none;
}

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

.input--big {
min-height: 70px;
background-size: 19px;
background-position: 26px center;
padding-left: 62px;
font-size: 16px;
line-height: 22px;
text-shadow: 0 4px 4px 0 #00000040;
}

.input--big:hover {
box-shadow: var(--big-box-shadow);
}

.input--big:focus {
box-shadow: var(--big-box-shadow);
background-position: 26px center;
background-size: 19px;
}

.input--small {
min-height: 42px;
background-size: 11px;
background-position: 13px center;
padding-left: 33px;
font-size: 14px;
line-height: 19px;
}

.input--small:hover {
box-shadow: var(--small-box-shadow);
}

.input--small:focus {
box-shadow: var(--small-box-shadow);
background-position: 13px center;
background-size: 11px;
}
Loading