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

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

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. The attributes of the

tag should start on new lines with proper 2-space indentation.

<div class="icon">

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 'icon' could be more descriptive.

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

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. The attributes of the tag should start on new lines with proper 2-space indentation.

Copy link
Author

Choose a reason for hiding this comment

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

it is in the code

</div>
</form>

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

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. The attributes of the tag should start on new lines with proper 2-space indentation.

</div>

Choose a reason for hiding this comment

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

Remember about correct indentation between parent and child elements. The elements inside the tag should be indented with 2 spaces.

</body>
</html>
83 changes: 82 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,82 @@
/* add styles here */
@font-face {
font-family: Avenir;
font-weight: 300;
src: url('./fonts/Avenir-Book.ttf') format('truetype');
}

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

body {
margin: 0;
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 family for Avenir in case it fails to load. For example, 'font-family: Avenir, Arial, sans-serif;'. This ensures text is still readable with a default font.


.search-container {
display: flex;
flex-direction: column;
align-items: stretch;
padding: 20px;
}

.search-input {
width: 95%;
padding-left: 40px;
border: 1px solid #e1e7ed;
border-radius: 4px;
font-weight: 300;
transition: border-color 0.3s;
box-shadow: 0 0 7 rgb(205, 205, 205);
font-family: inherit;

Choose a reason for hiding this comment

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

The 'box-shadow' property value seems to be missing a unit for the blur radius. It should be something like 'box-shadow: 0 0 7px rgb(205, 205, 205);'.

position: relative;
}

.big {
margin-top: 20px;
height: 70px;
font-size: 16px;
}

Choose a reason for hiding this comment

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

The classes '.big' and '.small' are fixing the height of the input fields, which could lead to overflow or accidental scroll bars if the content exceeds the height. Consider using padding and line-height to control the size and let the content dictate the height.


.small {
margin-top: 20px;
height: 42px;
font-size: 14px;
box-shadow: 0 0 7 rgb(217, 216, 216);
}

Choose a reason for hiding this comment

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

The 'box-shadow' property in the .small class should also include a unit for the blur radius, similar to the .search-input class.


.search-input:hover {
border-color: #e1e7ed;
box-shadow: 0 3px 5px rgb(153, 153, 153);
}

.search-input:focus {
background:
linear-gradient(#ffff, #f6f6f7),
url(../src/images/Search.svg) no-repeat 30px;
color: #3d4e61;

Choose a reason for hiding this comment

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

The URL for the background image in the .search-input:focus selector should be relative to the CSS file. If the images folder is on the same level as the src folder, the correct path would be './images/Search.svg'.

font-weight: 600;
font-family: inherit;
outline: none;
}

.icon::before {
/* background: url(../src/images/Search.svg) no-repeat; */
content: url(../src/images/Search.svg);
position: absolute;

Choose a reason for hiding this comment

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

The content URL in the .icon::before selector should be relative to the CSS file as well. Make sure the path is correct based on the project's folder structure.

top: 100px;
}

.big:focus {
text-shadow: 0 3px 3px #bbbec2;
}

.small:hover {
box-shadow: 0 3px 5px rgb(206, 206, 206);
}

.small:focus {
box-shadow: none;
}
Loading