-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 #3887
base: master
Are you sure you want to change the base?
Develop #3887
Conversation
lLiashko
commented
Dec 16, 2023
- DEMO LINK
- TEST REPORT LINK
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.
Good job.
Please check comments
src/index.html
Outdated
<h1>Search bar airbnb</h1> | ||
<body data-qa="hover"> | ||
<!--First bar--> | ||
<div class="search-bar search-bar__big" data-qa="big"> |
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.
<div class="search-bar search-bar__big" data-qa="big"> | |
<form class="search-bar" data-qa="big"> |
use form tag instead div
search-bar__big element is redundant.
set all styles for search-bar and just change necessary for small form in search-bar__small element.
same for other elements
src/style.css
Outdated
padding: 0; | ||
border: 0; |
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.
padding: 0; | |
border: 0; |
redundant. body doesn't have default paddings or magins.
src/style.css
Outdated
input { | ||
width: 100%; | ||
} |
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.
style by class instead by tag
input { | |
width: 100%; | |
} |
src/style.css
Outdated
width: 100%; | ||
} | ||
|
||
input::placeholder { |
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.
input::placeholder { | |
.search-bar__text::placeholder { |
src/style.css
Outdated
color: #3d4e61; | ||
font-family: Avenir, sans-serif; | ||
font-weight: 400; | ||
line-height: normal; |
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.
instead width 100% you can make this element block. it will allow to set height, and width will be 100% by default
line-height: normal; | |
line-height: normal; | |
display: block; | |
height: 100%; |
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.
Still not fixed
src/style.css
Outdated
.search-bar__text-big { | ||
margin-left: 60px; | ||
padding-right: 29px; | ||
font-size: 16px; | ||
width: 129px; | ||
height: 22px; |
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.
.search-bar__text-big { | |
margin-left: 60px; | |
padding-right: 29px; | |
font-size: 16px; | |
width: 129px; | |
height: 22px; | |
.search-bar__text-big { | |
padding-left: 60px; | |
padding-right: 29px; | |
font-size: 16px; |
src/style.css
Outdated
.search-bar__text-small { | ||
justify-content: flex-end; | ||
font-size: 14px; | ||
width: 126.29px; | ||
height: 20px; | ||
padding-left: 33px; | ||
} |
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.
.search-bar__text-small { | |
justify-content: flex-end; | |
font-size: 14px; | |
width: 126.29px; | |
height: 20px; | |
padding-left: 33px; | |
} | |
.search-bar__text-small { | |
justify-content: flex-end; | |
font-size: 14px; | |
height: 20px; | |
padding-left: 33px; | |
} |
do not hardcode width. it will make visible placeholder and will be possible to write text on full input
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.
Thank you for comments! I've changed my code
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.
src/index.html
Outdated
<body> | ||
<h1>Search bar airbnb</h1> | ||
<body data-qa="hover"> | ||
<!--First bar--> |
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.
Comment is redundant here
<!--First bar--> |
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.
They help me to find right bar quicker
src/index.html
Outdated
<input | ||
class="search-bar__text" | ||
type="text" | ||
placeholder="Try "Los Angeles"" | ||
data-qa="keypress"> |
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.
<input | |
class="search-bar__text" | |
type="text" | |
placeholder="Try "Los Angeles"" | |
data-qa="keypress"> | |
<input | |
class="search-bar__text" | |
type="text" | |
placeholder="Try "Los Angeles"" | |
data-qa="keypress" | |
> |
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.
That is correct formatting - it's better to stick to it
src/index.html
Outdated
placeholder="Try "Los Angeles"" | ||
data-qa="keypress"> | ||
</form> | ||
<!--Second bar--> |
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.
<!--Second bar--> |
src/index.html
Outdated
data-qa="keypress"> | ||
</form> | ||
<!--Second bar--> | ||
<div class="search-bar search-bar__small" data-qa="small"> |
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.
Use a semantic tag form here instead of div
src/style.css
Outdated
font-family: Avenir; | ||
src: url("./fonts/Avenir-Book.ttf") format("truetype"); | ||
font-weight: 300; | ||
font-style: normal; |
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.
Default value, so you can just remove it everywhere
font-style: normal; |
src/style.css
Outdated
@@ -1 +1,107 @@ | |||
/* add styles here */ | |||
@font-face { | |||
font-family: Avenir; | |||
src: url("./fonts/Avenir-Book.ttf") format("truetype"); |
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.
src: url("./fonts/Avenir-Book.ttf") format("truetype"); | |
src: url("./fonts/Avenir-Book.ttf"); |
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.
Another mentor in chat sent me this example, so I don't really understand which variant is right
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.
you may google what does it mean
generally, it's needed to explicitly set the format of the font file:
https://css-tricks.com/snippets/css/using-font-face-in-css/
but it could work w/o it
so you may keep any variant
src/style.css
Outdated
color: #3d4e61; | ||
font-family: Avenir, sans-serif; | ||
font-weight: 400; | ||
line-height: normal; |
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.
Still not fixed
src/style.css
Outdated
/* #endregion */ | ||
|
||
/* #region text */ |
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.
Remove comments everywhere
/* #endregion */ | |
/* #region text */ |
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.
Could you please explain why? In lecture videos they are used almost everywhere and it really helps
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.
yes, it could be helpful during the development (when you write code), but it's not ok to push it (in case this code goes to production)
Generally, it's not critical here, but at least FYI - we don't want to push such code in production in real life
In the future you will divide a separate blocks in separate files anyway 🙂
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.
thank you foR the explanation!
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.
GJ 👍
Some fixes are still needed to make it better)
src/index.html
Outdated
<input | ||
class="search-bar__text" | ||
type="text" | ||
placeholder="Try "Los Angeles"" | ||
data-qa="keypress"> |
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.
That is correct formatting - it's better to stick to it
src/style.css
Outdated
background: linear-gradient(180deg, #FFF 0%, #F6F6F7 100%); | ||
} | ||
|
||
.search-bar input[type="text"] { |
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.
do not use such selectors (combined)
you have 1 class for it
.search-bar input[type="text"] { | |
.search-bar-text { |
src/style.css
Outdated
color: #3d4e61; | ||
font-family: Avenir, sans-serif; | ||
font-weight: 400; | ||
line-height: normal; |
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.
padding-right: 75%; | ||
} | ||
|
||
.search-bar__text:focus { |
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.
you should add a gradient to the input, and make it 100% width
also typed text should have a different font-weight - 800 (Avenir-Heavy)
src/style.css
Outdated
justify-content: flex-end; | ||
font-size: 14px; | ||
padding-left: 33px; | ||
padding-right: 75%; |
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.
why?
} | ||
|
||
.search-bar:hover { | ||
background: #FFF; |
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.
redundant
it might overwrite gradient when input is focused
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.
Great work! Almost done
src/index.html
Outdated
type="text" | ||
placeholder="Try "Los Angeles"" | ||
data-qa="keypress" | ||
> |
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.
> | |
> |
src/style.css
Outdated
font-family: Avenir, sans-serif; | ||
font-weight: 400; | ||
padding-left: 62px; | ||
padding-right: 68%; |
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.
padding-right: 68%; | |
padding-right: 62px; |
border: none; | ||
outline: none; | ||
display: block; | ||
height: 100%; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
Great work!