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

Solution #4501

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

KrivorotkoYurii
Copy link

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on ordering the import statements correctly and structuring the variables.css file! Keep up the good work with following best practices. 👍 Remember, every improvement counts, and attention to detail will make your code shine even brighter! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

Comment on lines +20 to +21
outline: none;
font-weight: 900;

Choose a reason for hiding this comment

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

The use of font-weight: 900; on focus might lead to a text reflow which can be distracting for users. Consider maintaining consistent font weight or using other visual cues for focus state that do not affect the layout or text flow.

Comment on lines +23 to +26
background: linear-gradient(
var(--first-gradient-form-color),
var(--second-gradient-form-color)
);

Choose a reason for hiding this comment

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

Ensure that the background gradient on focus enhances the usability and accessibility of the input field. If the gradient makes the text hard to read or the focus state less discernible, consider using a simpler background color change or a border to indicate focus.

@@ -0,0 +1,7 @@
.main {
margin: 0 8px;

Choose a reason for hiding this comment

The 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). In this case, since the .main__form class already has a margin-top, you should consider removing the margin from the .main class or ensure that the vertical margins are only applied in one direction to avoid potential margin collapse issues.

Comment on lines +20 to +21
background: center no-repeat url(../images/Search.svg);
background-size: cover;

Choose a reason for hiding this comment

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

The background-size: cover; property on the .search-form__search-icon class might not be appropriate for an icon. The cover value scales the background image to cover the element's entire area, which could distort the icon if its aspect ratio doesn't match the element's. Consider using contain to ensure the entire icon is visible, or set explicit width and height values that match the icon's dimensions.

Comment on lines +30 to +32
.search-form--large:hover,
.search-form:has(.search-form__input--large:focus) {
box-shadow: 0 4px 4px var(--box-large-hover-shadow-color);

Choose a reason for hiding this comment

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

The selector .search-form:has(.search-form__input--large:focus) uses the :has() pseudo-class, which is not widely supported and may not work in all browsers. Consider using JavaScript to add a class to the .search-form element when the .search-form__input--large element is focused, and style that class instead.

Comment on lines +36 to +41
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
class="search-form__input search-form__input--large"
/>

Choose a reason for hiding this comment

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

The placeholder text 'Try “Los Angeles“' should not include quotes as they are unnecessary in this context and can be confusing for users. Consider simplifying it to just 'Try Los Angeles'.

Comment on lines +46 to +60
<form
class="search-form search-form--small"
data-qa="small"
>
<a
href="#"
class="search-form__search-icon search-form__search-icon--small"
></a>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
class="search-form__input search-form__input--small"
/>

Choose a reason for hiding this comment

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

The attributes within the

and tags should start on a new line with 2-space indentation relative to the tag, and the tag’s closing bracket should be on the same level as the opening one, according to the checklist.

Comment on lines +10 to +12
* {
box-sizing: border-box;
}

Choose a reason for hiding this comment

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

Don't use the * selector as it impacts performance. Set styles only for elements that require them.


html,
input {
font-family: Avenir, Arial, Helvetica, sans-serif;

Choose a reason for hiding this comment

The 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. While you have added Arial and Helvetica as fallbacks, it's also a good practice to include a generic family name such as 'sans-serif'.

input {
font-family: Avenir, Arial, Helvetica, sans-serif;
color: var(--text-color);
font-weight: 300;

Choose a reason for hiding this comment

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

Be consistent with your font-weight usage. If there is no specific design requirement for a lighter font-weight, it's common to use the default weight of 400 for readability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants