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

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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@mate-academy/backstop-config": "latest",
"@mate-academy/bemlint": "latest",
"@mate-academy/linthtml-config": "latest",
"@mate-academy/scripts": "^1.7.3",
"@mate-academy/scripts": "^1.8.1",
"@mate-academy/stylelint-config": "latest",
"backstopjs": "6.2.2",
"jest": "^29.7.0",
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“"
/>
<form
class="search__bar"
data-qa="big"
>
<input
class="search__input search__input--big"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</form>

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

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

body {
font-family: Avenir, sans-serif;
}

.search__bar {
margin-top: 20px;
}

.search__input {
box-shadow: 0 1px 8px 0 #3d4e611a;
border-radius: 4px;
border: 1px solid #e1e7ed;
background: #fff;
width: 100%;
color: #3d4e61;

box-sizing: border-box;
background-image: url(/src/images/Search.svg);
background-repeat: no-repeat;
}

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

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

.search__input:hover {
box-shadow: 0 3px 8px 0 #3d4e6133;
}

.search__input:focus {
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
border-radius: 3px;
font-weight: 900;
}

.search__input::placeholder {
font-family: inherit;
font-size: 16px;
font-weight: 300;
color: #3d4e61;
}

.search__input--small::placeholder {
font-family: inherit;
font-size: 14px;
font-weight: 300;
color: #3d4e61;
}

Choose a reason for hiding this comment

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

Suggested change
font-family: inherit;
font-size: 14px;
font-weight: 300;
color: #3d4e61;
font-size: 14px;

Choose a reason for hiding this comment

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

no need to duplicate other styles as far as they are set by .search__input

Loading