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

Open
wants to merge 2 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://chelsea7smile.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://chelsea7smile.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
34 changes: 24 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,30 @@
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<form
class="form form_big"
action="search"
data-qa="big"
>

Choose a reason for hiding this comment

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

The class name 'form_big__input' suggests a BEM naming convention, but it should be 'form__input form__input--big' to correctly represent the block and modifier structure.

<input
class="input form_big__input"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</form>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<form
class="form form_small"
action="search"
data-qa="small"
>

Choose a reason for hiding this comment

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

The class name 'form_small__input' suggests a BEM naming convention, but it should be 'form__input form__input--small' to correctly represent the block and modifier structure.

<input
class="input form_small__input"
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
</form>
</body>
</html>
95 changes: 94 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,94 @@
/* add styles here */
@font-face {
font-family: Avenir, Arial, sans-serif;
src: url(fonts/Avenir-Book.ttf);

Choose a reason for hiding this comment

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

The font-family property should not include multiple fonts separated by commas within the @font-face rule. Instead, specify only the custom font name, like Avenir, and use fallback fonts in the font-family property of other CSS selectors.

font-weight: 300;
}

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

Choose a reason for hiding this comment

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

Similar to line 2, the font-family property should only specify the custom font name Avenir-Heavy without fallback fonts. Fallbacks should be used in other CSS selectors.

font-weight: bold;
}

body {
margin: 0;
padding: 0 8px;
}

.form {
position: relative;
margin: 0 auto;
}

.form::before {
content: '';
position: absolute;
z-index: 1;
background-image: url('./images/Search.svg');
background-repeat: no-repeat;
background-size: contain;
}

.form_big::before {
width: 19px;
height: 19px;
top: 25px;
left: 26px;
}

.form_small::before {
width: 11px;
height: 11px;
left: 13px;
top: 15px;
transform: translateY(0%);
}

.input {
box-sizing: border-box;
display: flex;
align-items: center;
width: 100%;
margin-top: 20px;
font-family: Avenir-Book, Arial, sans-serif;
font-weight: 300;

Choose a reason for hiding this comment

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

The font-family property should use the custom font name defined in the @font-face rule without fallback fonts. Use Avenir instead of Avenir-Book.

border: 1px solid #e1e7ed;
border-radius: 4px;
box-shadow: 0 1px 8px 0 rgba(61, 78, 97, 0.1);
color: #3d4e61;
outline: none;
}

.form_big__input {
height: 70px;
padding: 25px 26px 26px 62px;
font-size: 16px;
line-height: 22px;
}

.form_small__input {
height: 42px;
padding-left: 33px;
font-size: 14px;
font-weight: 400;
background-position: 12px 48%;
background-size: 11px;
}

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

.input:focus {
border-radius: 3px;
box-shadow: 0 2px 8px 0 rgba(61, 78, 97, 0.2);
background: linear-gradient(0deg, #f6f6f7, #fff);
text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
font-family: Avenir-Heavy, Arial, sans-serif;
font-weight: 900;

Choose a reason for hiding this comment

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

The font-family property should use the custom font name defined in the @font-face rule without fallback fonts. Use Avenir-Heavy instead of Avenir-Heavy, Arial, sans-serif.

}

.form_small__input:focus {
box-shadow: none;
text-shadow: none;
}
Loading