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

Develop #4468

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Develop #4468

wants to merge 3 commits into from

Conversation

AndriiKasiian
Copy link

@AndriiKasiian AndriiKasiian commented Sep 15, 2024

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 structuring your CSS! While there are a few points to consider for improvement, none of them are critical issues that would warrant a REQUEST_CHANGES decision. Keep up the good work and consider the feedback to further refine your code in the future. Remember, attention to detail can make your code even more maintainable and scalable! 😊👍

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

Comment on lines +20 to +31
<form
class="search-container search-container_big"
data-qa="big"
>
<label class="search__label search__label_big">
<input
class="search-bar search-bar_big"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</label>

Choose a reason for hiding this comment

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

There should be an empty line between sibling form elements to add some 'air' and simplify reading. Please add an empty line between the closing </form> tag on line 32 and the opening <form> tag on line 33.

Comment on lines +19 to +45
<body class="page">
<form
class="search-container search-container_big"
data-qa="big"
>
<label class="search__label search__label_big">
<input
class="search-bar search-bar_big"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</label>
</form>
<form
class="search-container search-container_small"
data-qa="small"
>
<label class="search__label search__label_small">
<input
class="search-bar search-bar_small"
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
</label>
</form>

Choose a reason for hiding this comment

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

Remember about correct indentation between parent and child elements. The form elements and their children should have a 2-space offset from their parent body tag.

Comment on lines +1 to +4
* {
padding: 0;
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 * selector (it impacts performance). Set styles only for elements that require them. Zeroing out your margins, paddings or other styles with '*' is still inefficient for the browser.

}

body {
font-family: Avenir, 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. It's good practice to specify a generic font family as a fallback. For example, 'font-family: Avenir, Arial, sans-serif;' ensures that if Avenir is not available, Arial will be used before falling back to the default sans-serif font.

border-radius: 4px;
color: #3d4e61;
font-weight: 300;
font-family: inherit;

Choose a reason for hiding this comment

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

It's recommended to have a fallback font-family in case the inherited font is not available. Consider adding a generic font family as a backup.


.search-container_big {
width: 100%;
height: 70px;

Choose a reason for hiding this comment

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

Don't fix container size (if there is no such a requirement). The fixed height can lead to content overflow or accidental scroll bars if the content exceeds the container's height. Consider using padding and allow the content to define the height.


.search-container_small {
width: 100%;
height: 42px;

Choose a reason for hiding this comment

The 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, avoid using a fixed height unless it's a specific requirement. Content should dictate the height of the container to prevent overflow issues.

position: relative;
display: block;
width: 100%;
height: 100%;

Choose a reason for hiding this comment

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

Avoid fixing the container size with 100% height unless there is a specific requirement. It's better to let the content size dictate it to avoid overflow or accidental scroll bars.

Comment on lines +18 to +21
width: 19px;
height: 19px;
top: 25px;
left: 26px;

Choose a reason for hiding this comment

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

Consider using a CSS variable for the background image URL since it's repeated in both .search__label_big::after and .search__label_small::after. This will make it easier to manage if the image needs to be changed in the future.

Comment on lines +20 to +21
top: 25px;
left: 26px;

Choose a reason for hiding this comment

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

The fixed pixel values for top and left could potentially cause issues if the label size changes. Consider using relative units like percentages or em for better scalability.

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

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

Great! 🔥

Comment on lines +28 to +29
- [DEMO LINK](https://AndriiKasiian.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://AndriiKasiian.github.io/layout_search-bar-airbnb/report/html_report/)

Choose a reason for hiding this comment

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

Add these links to the PR description
image

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.

3 participants