-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
finished search bar #4488
base: master
Are you sure you want to change the base?
finished search bar #4488
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 |
---|---|---|
@@ -1 +1,110 @@ | ||
/* add styles here */ | ||
@font-face { | ||
font-family: Avenir; | ||
src: url(fonts/Avenir-Book.ttf); | ||
font-weight: 400; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: Avenir; | ||
src: url(fonts/Avenir-Heavy.ttf); | ||
font-weight: 900; | ||
font-style: normal; | ||
} | ||
|
||
body { | ||
margin-top: 20px; | ||
} | ||
|
||
Comment on lines
+15
to
+17
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. Be consistent with your margins (Add only top or bottom, but not both). It's better to avoid potential margin collapse issues by sticking to either top or bottom margins for elements. Consider removing the |
||
/* #region form */ | ||
|
||
.form { | ||
display: flex; | ||
position: relative; | ||
flex-direction: column; | ||
gap: 20px; | ||
} | ||
|
||
.form__bar { | ||
/* element settings */ | ||
box-sizing: border-box; | ||
border: 1px solid #e1e7ed; | ||
border-radius: 4px; | ||
font-family: Avenir, Helvetica, sans-serif; | ||
|
||
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. Remember to use fallback fonts - alternative font-family in case the main one doesn't work. It's recommended to have a generic font family as a fallback in case the primary font fails to load. In this case, 'sans-serif' is already present, which is good practice. |
||
/* content ssetings */ | ||
color: #3d4e61; | ||
font-weight: 400; | ||
} | ||
|
||
.form__bar--big { | ||
height: 70px; | ||
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. Don't fix container size (if there is no such a requirement). Setting a fixed height on input fields can make them less flexible. Consider using padding and letting the content dictate the size of the input field. |
||
padding-left: 62px; | ||
font-size: 16px; | ||
box-shadow: 0 1px 8px 0 #3d4e611a; | ||
} | ||
|
||
.form__bar--small { | ||
height: 42px; | ||
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. Don't fix container size (if there is no such a requirement). As with the previous comment, consider using padding instead of a fixed height to allow the content to dictate the size of the input field. |
||
padding-left: 33px; | ||
font-size: 14px; | ||
box-shadow: 0 1px 8px 0 #3d4e611a; | ||
} | ||
|
||
.form__bar--big::placeholder { | ||
font-weight: 400; | ||
color: #3d4e61; | ||
} | ||
|
||
.form__bar--small::placeholder { | ||
font-weight: 400; | ||
color: #3d4e61; | ||
} | ||
|
||
.form__bar--big:hover { | ||
box-shadow: 0 3px 8px 0 #3d4e6133; | ||
} | ||
|
||
.form__bar--small:hover { | ||
box-shadow: 0 3px 8px 0 #3d4e6133; | ||
} | ||
|
||
.form__bar--big:focus { | ||
outline: none; | ||
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%); | ||
box-shadow: (0 4px 4px #3d4e6133); | ||
font-weight: 900; | ||
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. There seems to be a typo in the box-shadow value. The correct syntax for box-shadow does not include parentheses around the values. It should be |
||
} | ||
|
||
.form__bar--small:focus { | ||
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%); | ||
box-shadow: none; | ||
outline: none; | ||
font-weight: 900; | ||
} | ||
|
||
.form__label-big { | ||
position: absolute; | ||
top: 25px; | ||
left: 26px; | ||
height: 19px; | ||
width: 19px; | ||
z-index: 1; | ||
background-image: url(images/Search.svg); | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
} | ||
|
||
.form__label-small { | ||
position: absolute; | ||
top: 105px; | ||
left: 13px; | ||
height: 11px; | ||
width: 11px; | ||
z-index: 1; | ||
background-image: url(images/Search.svg); | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
} | ||
|
||
/* #endregion */ |
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.
Add empty lines between multiline sibling blocks of HTML to add some 'air' and simplify reading. But don't add them between parent and child elements. In this case, there should be an empty line between the
label
andinput
elements, but not between theform
and the firstlabel
.