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 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://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"
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"
eugenia-andropova marked this conversation as resolved.
Show resolved Hide resolved
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::placeholder {
color: #3d4e61;

Choose a reason for hiding this comment

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

The selector .search-bar::placeholder is incorrect. The ::placeholder pseudo-element should be used with an input element, like .search-bar__input::placeholder.

}

.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;

Choose a reason for hiding this comment

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

There is an inconsistency in class naming. The class .search_bar__input--big uses an underscore instead of a hyphen. It should be .search-bar__input--big to maintain consistency with the BEM naming convention used elsewhere.

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 {

Choose a reason for hiding this comment

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

There is an inconsistency in class naming. The class .search_bar__input--big:hover uses an underscore instead of a hyphen. It should be .search-bar__input--big:hover to maintain consistency with the BEM naming convention used elsewhere.

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

.search_bar__input--big:focus,
.search-bar__input--small:focus {

Choose a reason for hiding this comment

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

There is an inconsistency in class naming. The class .search_bar__input--big:focus uses an underscore instead of a hyphen. It should be .search-bar__input--big:focus to maintain consistency with the BEM naming convention used elsewhere.

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