-
Notifications
You must be signed in to change notification settings - Fork 4k
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 #4383
base: master
Are you sure you want to change the base?
DEVELOP #4383
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,16 +17,30 @@ | |
/> | ||
</head> | ||
<body> | ||
<input | ||
type="text" | ||
data-qa="keypress" | ||
placeholder="Try “Los Angeles“" | ||
/> | ||
<form | ||
class="searchbar" | ||
data-qa="big" | ||
> | ||
<input | ||
class="searchbar__input searchbar__big" | ||
type="text" | ||
name="searchbar__bar searchbar__big" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is weird value for name property. It is primarily used in form elements to identify input fields when they are submitted to a server. |
||
placeholder="Try “Los Angeles“" | ||
data-qa="keypress" | ||
/> | ||
</form> | ||
|
||
<input | ||
type="text" | ||
data-qa="hover" | ||
placeholder="Try “Los Angeles“" | ||
/> | ||
<form | ||
class="searchbar" | ||
data-qa="small" | ||
> | ||
<input | ||
class="searchbar__input searchbar__small" | ||
type="text" | ||
name="searchbar__bar searchbar__small" | ||
placeholder="Try “Los Angeles“" | ||
data-qa="keypress" | ||
/> | ||
</form> | ||
</body> | ||
</html> |
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: 900; | ||
} | ||
|
||
.searchbar { | ||
margin: 20px 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this task its okay. But remember that if you want to configure the external geometry or positioning of a block, use separate classes or mix-ins to separate external properties (positioning, margins) from internal properties (padding). This approach helps avoid conflicts between element styles. |
||
} | ||
|
||
.searchbar__input { | ||
width: 100%; | ||
background-image: url('./images/Search.svg'); | ||
background-repeat: no-repeat; | ||
background-color: #fff; | ||
border-radius: 4px; | ||
box-shadow: 0 1px 8px rgba(61, 78, 97, 0.1); | ||
outline: none; | ||
box-sizing: border-box; | ||
border: 1px solid #e1e7ed; | ||
font-family: Avenir, sans-serif; | ||
} | ||
|
||
.searchbar__input::placeholder { | ||
color: #3d4e61; | ||
Yatsomo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
.searchbar__big { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. try to use modifier instead |
||
height: 70px; | ||
background-position: 25px 24px; | ||
background-size: 19px 19px; | ||
padding-left: 62px; | ||
font-size: 16px; | ||
line-height: 22px; | ||
} | ||
|
||
.searchbar__small { | ||
height: 42px; | ||
background-position: 12px 14px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it should be 13px 15px There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When its like that the test comes back negative. Should I still change it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it fails test then don't change it. |
||
background-size: 11px 11px; | ||
padding-left: 33px; | ||
font-size: 14px; | ||
line-height: 19px; | ||
} | ||
|
||
.searchbar__input:hover { | ||
box-shadow: 0 3px 8px rgba(61, 78, 97, 0.2); | ||
} | ||
|
||
.searchbar__input:focus { | ||
border-radius: 3px; | ||
font-weight: 900; | ||
background-image: url(images/Search.svg) | ||
linear-gradient(180deg, #fff 0%, #f6f6f7 100%); | ||
background-repeat: no-repeat; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its great case to use modifier class name like this
searchbar__input searchbar__input--big