-
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
add task solution #4511
base: master
Are you sure you want to change the base?
add task solution #4511
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,34 @@ | |
/> | ||
</head> | ||
<body> | ||
<input | ||
type="text" | ||
data-qa="keypress" | ||
placeholder="Try “Los Angeles“" | ||
/> | ||
|
||
<input | ||
type="text" | ||
data-qa="hover" | ||
placeholder="Try “Los Angeles“" | ||
/> | ||
<form | ||
action="/submit-your-form-handler" | ||
method="post" | ||
class="search-form" | ||
> | ||
<div class="search-group"> | ||
<div | ||
class="search" | ||
data-qa="big" | ||
> | ||
<input | ||
type="text" | ||
class="search__bar search__bar--top" | ||
data-qa="keypress" | ||
placeholder="Try “Los Angeles“" | ||
Comment on lines
+30
to
+34
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. The attributes in the |
||
/> | ||
</div> | ||
<div | ||
class="search" | ||
data-qa="small" | ||
> | ||
<input | ||
type="text" | ||
class="search__bar search__bar--bottom" | ||
placeholder="Try “Los Angeles“" | ||
Comment on lines
+41
to
+44
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. The attributes in the |
||
/> | ||
</div> | ||
</div> | ||
</form> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,79 @@ | ||
/* 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; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
.search-group { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 20px; /* Espaçamento de 20px entre os elementos filhos */ | ||
padding: 20px 8px; | ||
} | ||
|
||
.search__bar { | ||
font-size: 16px; | ||
box-sizing: border-box; | ||
border: 1px solid rgba(225, 231, 237, 1); | ||
width: 100%; /* Ajuste para largura total */ | ||
box-shadow: 0 1px 8px 0 #3d4e611a; | ||
font-family: Avenir, Arial, 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. For example, 'font-family: Avenir, Arial, sans-serif;' is a good practice as you have done, but ensure that 'Arial' is not the only fallback font. Consider adding another generic family such as 'Helvetica' to improve cross-platform compatibility. |
||
|
||
.search__bar::placeholder { | ||
color: #3d4e61; | ||
} | ||
|
||
.search__bar--top { | ||
height: 70px; | ||
border-radius: 4px 4px 0 0; | ||
border: 1px solid rgba(225, 231, 237, 1); | ||
opacity: 1; | ||
padding: 19px 10px 19px 62px; /* Ajuste o padding esquerdo para 62px */ | ||
background-image: url('./images/Search.svg'); | ||
background-repeat: no-repeat; | ||
background-position: 26px center; | ||
background-size: 19px 19px; | ||
} | ||
|
||
.search__bar--bottom { | ||
height: 42px; | ||
border-radius: 0 0 4px 4px; | ||
border: 1px solid rgba(225, 231, 237, 1); | ||
opacity: 1; | ||
padding: 11px 10px 11px 33px; | ||
background-image: url('./images/Search.svg'); | ||
background-repeat: no-repeat; | ||
background-position: 13px center; /* Ícone a 11px da esquerda */ | ||
background-size: 11px 11px; | ||
font-size: 14px; | ||
} | ||
|
||
.search__bar:focus { | ||
border-color: rgba(0, 0, 0, 0.25); | ||
outline: none; | ||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.25); | ||
font-family: Avenir-Book, Arial, sans-serif; /* Usar Avenir-Heavy no focus */ | ||
font-weight: 900; | ||
text-shadow: 0 4px 4px #00000040; | ||
} | ||
Comment on lines
+68
to
+70
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. The font-family 'Avenir-Book' used here does not match the font-family 'Avenir' defined in the @font-face rule. Instead, you should specify the font-weight to ensure the correct font is used. Also, 'font-weight: 900;' is incorrect here because 'Avenir-Book' is a lighter weight (likely 300), not the heaviest weight (900). |
||
|
||
.search__bar:hover { | ||
border-color: rgba(0, 0, 0, 0.25); | ||
outline: none; | ||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.25); | ||
font-family: Avenir-Heavy, Arial, sans-serif; | ||
font-weight: 900; | ||
} | ||
Comment on lines
+77
to
+78
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. As with the previous comment, the font-family 'Avenir-Heavy' should not be used directly. Use the 'font-family: Avenir;' with the appropriate 'font-weight' to ensure the correct font is applied. The 'font-weight' should match the one defined in your @font-face rule for 'Avenir-Heavy', which is 900. |
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.
The attributes in the
<form>
tag should start each on a new line with 2-space indentation related to the tag to keep the attributes correctly formatted. The tag’s closing bracket should be on the same level as the opening one.