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 solution #4489

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

Choose a reason for hiding this comment

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

Class names should represent the meaning of the content, not the styles or tag names. The class name 'big-input' seems to describe the style rather than the content or function of the input.

type="text"
data-qa="big"
placeholder="Try “Los Angeles“"
/>
Comment on lines +20 to +26

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. If the HTML element has long attribute values or the number of attributes is more than 2, start each one, including the first, on a new line with 2-space indentation related to the tag.


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

Choose a reason for hiding this comment

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

Similar to the previous comment, the class name 'small-input' should be reconsidered to reflect the content or function rather than the style.

type="text"
data-qa="small"
placeholder="Try “Los Angeles“"
Comment on lines +28 to +32

Choose a reason for hiding this comment

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

Keep your attributes correctly formatted. If the HTML element has long attribute values or the number of attributes is more than 2, start each one, including the first, on a new line with 2-space indentation related to the tag.

/>
</form>
</body>
</html>
99 changes: 99 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,100 @@
/* add styles here */
@font-face {
font-family: Avenir;
src: url("fonts/Avenir-Book.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}

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

body {
font-family: Avenir, Arial, Helvetica, sans-serif;

Choose a reason for hiding this comment

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

Remember to use fallback fonts - alternative font-family in case the main one doesn't work. You have a good set of fallback fonts here, but it's a good practice to also include a generic font family at the end, such as 'sans-serif' to ensure maximum compatibility.

Comment on lines +16 to +17

Choose a reason for hiding this comment

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

Remember to use fallback fonts - alternative font-family in case the main one doesn't work. You've done this correctly here, but make sure to apply this practice throughout your project.

}

input {
display: block;
width: 100%;
margin-top: 20px;

Choose a reason for hiding this comment

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

Be consistent with your margins (Add only top or bottom, but not both). Here you've added a top margin, ensure that you're not also adding bottom margins elsewhere for the same element to avoid potential margin collapse.

Choose a reason for hiding this comment

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

Be consistent with your margins (Add only top or bottom, but not both). In this case, you have added a top margin to the input. Ensure that you use margins consistently throughout your CSS to avoid potential margin collapse.

font-family: Avenir, Arial, Helvetica, sans-serif;

Choose a reason for hiding this comment

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

There's no need to set the font-family for input if it's the same as the body's font-family, unless you want to override a specific style from a more specific selector.

border: 1px solid rgba(225, 231, 237, 1);
border-radius: 4px;
}

.big-input {
height: 70px;
box-shadow: 0 1px 8px 0 rgba(61, 78, 97, 0.1);
box-sizing: border-box;
padding-left: 62px;
background-image: url("./images/Search.svg");
background-repeat: no-repeat;
background-position: 25px center;
font-size: 16px;
color: rgba(61, 78, 97, 1);
font-weight: bold;
}

.big-input::placeholder {
color: rgba(61, 78, 97, 1);
font-weight: normal;
}

.big-input:hover {
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.big-input:focus {
outline: none;
background-image: url("./images/Search.svg"),
linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
background-repeat: no-repeat;
background-position:
25px center,
0 0;
background-size:
19px 19px,
100% 100%;
text-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.small-input {
height: 42px;
box-shadow: 0 1px 8px 0 rgba(61, 78, 97, 0.1);
box-sizing: border-box;
padding-left: 33px;
background-image: url("./images/Search.svg");
background-repeat: no-repeat;
background-position: 12px center;
background-size: 11px 11px;
color: rgba(61, 78, 97, 1);
font-weight: bold;
font-size: 14px;
}

.small-input::placeholder {
color: rgba(61, 78, 97, 1);
font-weight: normal;
}

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

.small-input:focus {
outline: none;
background-image: url("./images/Search.svg"),
linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
background-repeat: no-repeat;
background-position:
12px center,
0 0;
background-size:
11px 11px,
100% 100%;
text-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
}
Loading