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

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

Develop #4550

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
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://eugenia-andropova.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://eugenia-andropova.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
47 changes: 35 additions & 12 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,40 @@
href="style.css"
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<body class="page">

Choose a reason for hiding this comment

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

The class name 'page' should represent the meaning of the content rather than the style or tag name. Consider using a more descriptive class name.

<form
action="#"
method="post"
data-qa="big"
name="search-bar__input--big"

Choose a reason for hiding this comment

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

The name attribute 'search-bar__input--big' includes double underscores and dashes, which are typically used in class names for BEM (Block Element Modifier) methodology. Consider using a more appropriate naming convention for the name attribute.

class="search-bar"
>
<label>
<input
type="text"
placeholder="Try “Los Angeles“"
data-qa="keypress"
name="search-bar-big"
class="search-bar__input search-bar__input--big"
/>
</label>
</form>
<form
action="#"
method="post"
data-qa="small"
name="search-bar__input--small"

Choose a reason for hiding this comment

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

The name attribute 'search-bar__input--small' includes double underscores and dashes, which are typically used in class names for BEM (Block Element Modifier) methodology. Consider using a more appropriate naming convention for the name attribute.

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

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

.page {
font-family: Avenir, sans-serif;
}

Choose a reason for hiding this comment

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

Consider adding a fallback font to ensure that if 'Avenir' is not available, the browser can use an alternative font. This aligns with the checklist item: 'Remember to use fallback fonts - alternative font-family in case the main one doesn't work'.


.search-bar {
display: flex;
flex-direction: column;
margin-top: 20px;
}

.search-bar__input::placeholder {
color: #3d4e61;
}

.search-bar__input {
background: url(../src/images/Search.svg);
background-repeat: no-repeat;
width: 100%;
box-sizing: border-box;
border: 1px solid #e1e7ed;
border-radius: 4px;
outline: none;
}

.search-bar__input--big {
padding-left: 62px;
height: 70px;
font-size: 16px;
background-size: 19px;
background-position: left 26px center;
}

.search-bar__input--small {
height: 42px;
padding-left: 33px;
font-size: 14px;
background-size: 11px;
background-position: 13px center;
}

.search-bar__input--big:hover,
.search-bar__input--small:hover {
box-shadow: 0 3px 8px 0 rgba(61, 78, 97, 0.2);
}

.search-bar__input--big:focus,
.search-bar__input--small:focus {
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
font-weight: 900;
outline: none;
}
Loading