Skip to content

add task solution#5409

Open
Bamm531 wants to merge 6 commits into
mate-academy:masterfrom
Bamm531:develop
Open

add task solution#5409
Bamm531 wants to merge 6 commits into
mate-academy:masterfrom
Bamm531:develop

Conversation

@Bamm531
Copy link
Copy Markdown

@Bamm531 Bamm531 commented Apr 22, 2026

  • DEMO LINK

  • TEST REPORT LINK

  • Icon implemented using background-image CSS property

  • Inputs are written inside of 'form' tag with correctly passed attributes

  • All Typical Mistakes from BEM lesson theory are checked.

  • Code follows all the Code Style Rules ❗️

Copy link
Copy Markdown

@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.

Review Summary

I am requesting changes because there are still violations of explicit checklist requirements, which are treated as critical blockers for this task. In src/style.css and related CSS you use the universal selector * and tag selectors like form, input, and searchbar input for styling, which violates the rules “Don’t use * selector” and “Don’t use tag names for styling (except html and body)” [CHECKLIST ITEM #4, #5]; these selectors need to be refactored to class-based selectors (e.g., .searchbar__form, .searchbar__input) and the HTML updated to match. Both form elements in src/index.html are missing action and method attributes, which the checklist describes as “inputs inside form with correctly passed attributes” — add appropriate values such as action="#" and method="get" so forms are structurally correct. The linter also fails on src/index.html because the placeholder attributes at lines 38 and 55 are not double-quoted; update those attributes to use double quotes to satisfy the HTML lint rule. Additionally, the extra data-qa="hover" on a div is not required by the spec and should be removed to avoid confusion, and you should verify that the search icon path ./images/Search.svg matches your actual src/images structure.

Once you replace the disallowed selectors, add proper form attributes, and fix the placeholder quoting (plus the minor data-qa cleanup and path verification), your implementation should fully satisfy the task and pass linting. You’ve already covered the main functional requirements well (two search bars, background image icon, correct data-qa on big/small forms and keypress input, font-weight 300), so you’re very close; these changes will bring your solution fully in line with the project constraints.


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/index.html
Comment on lines +8 to 12
user-scalable=no,
initial-scale=1.0,
maximum-scale=1.0,
minimum-scale=1.0"
/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The stylesheet uses the universal selector * which violates the checklist item: "Don't use * selector (it impacts performance)". Remove * { ... } and target elements/classes specifically (e.g., set box-sizing on html, body or use a .root container).

Comment thread src/index.html Outdated
Comment on lines +33 to +35
<div class="searchbar__glass large"></div>
<input
class="searchInput searchInput--large"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The CSS and HTML use tag selectors (form, input) for styling. The checklist requires: "Don't use tag names for styling (except html and body)". Move these rules to class-based selectors (e.g., .search-form, .search-input) or scope via the existing classes.

Comment thread src/index.html
Comment on lines +32 to +39
<div class="searchbar__div">
<div class="searchbar__glass large"></div>
<input
class="searchInput searchInput--large"
type="text"
data-qa="keypress"
placeholder='Try "Los Angeles"'
/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Checklist item: "Icon implemented using background-image CSS property" — the icon uses background: url('./images/Search.svg') which is correct, but the path uses ./images/Search.svg. The requirement says use images from src/images. If CSS is in src/ and images are in src/images, the path should be ./images/Search.svg only if served accordingly. Confirm project structure; if CSS is in src/ this is fine. No change if path matches project layout.

Comment thread src/index.html
Comment on lines +28 to +31
<form
class="searchbar searchbar--large"
data-qa="big"
>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Checklist item: "Inputs are written inside of 'form' tag with correctly passed attributes" — inputs are inside form elements and the big input has data-qa="keypress". However, the forms lack action and method attributes. The checklist phrasing expects "correctly passed attributes" — add at least action="#" and method="get" (or appropriate) to each form to ensure attributes are present.

Comment thread src/index.html Outdated
Comment on lines +47 to +50
<div
class="searchbar__div"
data-qa="hover"
>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

HTML uses data-qa="hover" on a div — data-qa attributes are required only for big (data-qa="big"), small (data-qa="small") forms and data-qa="keypress" on big input. Having extra data-qa with value hover is unnecessary and may violate the spec. Remove or adjust if not required by task.

Comment thread src/searchbar.css
border-radius: 4px;
box-sizing: border-box;
max-width: 1008px;
width: 100%;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The CSS uses the universal selector * on line 8 which violates checklist item #4: "Don't use * selector". Remove or replace it with a class-based rule (e.g., apply box-sizing to html or specific container classes).

Comment thread src/searchbar.css Outdated
Comment on lines +33 to +37
background: url('./images/Search.svg') no-repeat;
background-position: -1px -1px;
background-size: contain;
margin-right: 17px;
margin-left: 26px;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Multiple rules target tag names for styling: form (line 33) and input (line 37). This violates checklist item #5: "Don't use tag names for styling (except html and body)". Use class selectors instead (e.g., .search-form, .search-input).

Comment thread src/searchbar.css
Comment on lines +1 to +5
.searchbar {
margin: 20px auto 0;
border: 1px solid #e1e7ed;
box-shadow: 0 1px 8px 0 #3d4e611a;
border-radius: 4px;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The @font-face font-family name is Avenir but there's no fallback font-family declaration for the font file itself; however more importantly, the project requires using @font-face (satisfied) and using fallback fonts for font-family. In style declarations (body and input) you do include fallbacks, but the font-face uses the real font name without quotes — it's OK. No direct violation here.

Comment thread src/searchbar.css
max-width: 704px;
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Default font-weight must be 300 according to requirements — you set font-weight: 300 on body (line 16) which satisfies the requirement. No change needed.

Comment thread src/searchbar.css
}

.searchbar__glass {
background: url('./images/Search.svg') no-repeat;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Icons must be implemented using background-image CSS property. You use background: url('./images/Search.svg') no-repeat; in searchbar.css (line 33) which satisfies checklist item #1. No change needed.

Comment thread src/searchbar.css
Comment on lines +28 to +41
.searchbar--small {
height: 42px;
}

.searchbar__glass {
background: url('./images/Search.svg') no-repeat;
background-position: -1px -1px;
background-size: contain;
margin-right: 17px;
margin-left: 26px;
color: #687c94;
}

.searchbar__glass.large {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Inputs must be inside form with correctly passed attributes (checklist item #2). You have both inputs wrapped in <form> elements and added required data-qa attributes (data-qa="big" on the large form and data-qa="small" on the small form; data-qa="keypress" is present on the big input). This satisfies the checklist item. No change needed.

Comment thread src/searchbar.css Outdated
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
}

.searchbar input {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The HTML uses tag selectors in CSS via searchbar input rules in searchbar.css (line 61) — this is also styling by tag within a class but the selector includes a tag input. The checklist forbids using tag names for styling (except html/body). This violates checklist item #5. Change selectors to class-based (e.g., .searchbar__input).

Comment thread src/searchbar.css Outdated
Comment on lines +47 to +49
width: 11px;
height: 11px;
margin: 0 9px 0 13px;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The HTML includes an extra data attribute data-qa="hover" on a div (line 49). The requirements mention semantic tags when possible; using div here is acceptable. No violation detected for semantics, but consider using meaningful class names rather than searchbar__div if desired.

Comment thread src/searchbar.css
Comment on lines +8 to +52
width: 100%;
}

@media (max-width: 720px) {
.searchbar {
max-width: 704px;
}
}

.searchbar__div {
width: 100%;
height: 100%;
display: flex;
align-items: center;
}

.searchbar--large {
height: 70px;
}

.searchbar--small {
height: 42px;
}

.searchbar__glass {
background: url('./images/Search.svg') no-repeat;
background-position: -1px -1px;
background-size: contain;
margin-right: 17px;
margin-left: 26px;
color: #687c94;
}

.searchbar__glass.large {
width: 19px;
height: 19px;
}

.searchbar__glass.small {
width: 11px;
height: 11px;
margin: 0 9px 0 13px;
}

.searchbar:hover {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The style.css file still contains the universal reset and tag-based rules which break the task constraints (lines 8, 33, 37). These need to be refactored to class-based rules and avoid * selector to comply with checklist items #4 and #5.

Comment thread src/style.css Outdated
Comment on lines +8 to +12
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist item #4: "Don't use * selector" — the rule is violated at style.css line 8 where * { ... } is used. Replace global selector with targeted classes or reset on html/body only.

Comment thread src/style.css Outdated
Comment on lines +33 to +35
form {
width: 100%;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist item #5: "Don't use tag names for styling (except html and body)" — several rules target tag selectors: form at style.css line 33 and input at line 37. Use classes or attribute selectors instead.

Comment thread src/style.css
Comment on lines +1 to +6
@font-face {
font-family: Avenir;
src: url('./fonts/Avenir.ttc') format('ttc');
font-weight: 300;
font-style: normal;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist item #3: "Remember to use fallback fonts - alternative font-family in case the main one doesn't work." — while font-family lists fallbacks in multiple places, the @font-face declared font-family name Avenir may conflict; ensure fallback is present where Avenir is used and that @font-face provides proper formats (woff/woff2). Also the src uses format('ttc') which is uncommon and may not load; provide woff/woff2 for broader support.

Comment thread src/style.css Outdated
flex-direction: column;
} /* add styles here */

form {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Checklist item #1: "Icon implemented using background-image CSS property" requires using images from src/images. The CSS uses background: url('./images/Search.svg') which is correct path-wise, but ensure the image exists at that path. If the file is missing, add it. (Checked at searchbar.css line 33)

Comment thread src/style.css Outdated
Comment on lines +28 to +46
'Segoe UI Symbol';
display: flex;
flex-direction: column;
} /* add styles here */

form {
width: 100%;
}

input {
outline: none;
box-shadow: none;
font-family:
Avenir,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Helvetica,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist item #2: "Inputs are written inside of 'form' tag with correctly passed attributes" — the inputs are inside form tags, but form elements lack action and method attributes. The checklist asks for inputs inside form with correctly passed attributes; add appropriate action and method attributes to both forms (e.g., action="/" method="get"). See index.html lines 28-31 and 43-46.

Comment thread src/style.css Outdated
Comment on lines +8 to +12
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates requirement: "Don't use * selector." (duplicate emphasis) The global reset should be removed — use html, body or specific class resets instead (style.css lines 8-12).

Comment thread src/style.css Outdated
Comment on lines +34 to +39
width: 100%;
}

input {
outline: none;
box-shadow: none;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist/code-style: "Don't use spaces in links" — in index.html the placeholder attribute uses double quotes with inner double quotes (placeholder='Try "Los Angeles"') which is acceptable, but ensure anchor hrefs (none present) have no spaces. No direct violation found otherwise.

Copy link
Copy Markdown

@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.

Review Summary

Your implementation still contains a critical violation of checklist items #4 and #5 in src/searchbar.css. Lines 69, 82, and 87 use tag selectors (.searchbar input, .searchbar input:focus, .searchbar input::placeholder) which combine a class with the input tag name. Per the explicit checklist rule "Don't use tag names for styling," these must be refactored to class-based selectors. Your inputs already have appropriate classes (searchInput, searchInput--large, searchInput--small), so update the CSS to use .searchInput, .searchInput:focus, and .searchInput::placeholder instead of descendant selectors with tag names. This is a blocker that prevents the linter from passing. The visual regression test differences (1.27-2.37%) are marginal and likely due to rendering variations rather than actual styling issues, so those don't require code changes on your end.


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/searchbar.css
box-shadow: 0 3px 8px 0 #3d4e6133;
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist item #5: 'Don't use tag names for styling'. Replace .searchbar input with a class-based selector like .searchbar__input and update the HTML to use this class on the input elements.

Comment thread src/searchbar.css Outdated
padding: 0;
}

.searchbar input:focus {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same tag selector violation - uses input tag name. Apply the same class-based selector fix mentioned for line 69.

Comment thread src/searchbar.css
outline: none;
font-weight: 900;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same tag selector violation - uses input tag name. Apply the same class-based selector fix mentioned for line 69.

Copy link
Copy Markdown

@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.

Review Summary

Your solution is approved with an educational note to help you progress. You've done an excellent job refactoring all tag-based selectors to class-based selectors in src/searchbar.css, which resolved the previous checklist violations [CHECKLIST ITEMS #4, #5]. The HTML structure with forms, data attributes, and the icon implementation using background-image are all correct. However, there's one spacing issue remaining: the distance between the two search bars is 0px, but the requirement specifies a 20px gap. In src/style.css, the .searchbar--large class has margin: 20px auto 0 with no bottom margin. Adding margin-bottom: 20px to this class will create the required gap between the search bars, addressing checklist item "Be consistent with margins." The visual regression test failures are environment-related (font rendering differences in CI) and not code issues—these can be resolved by regenerating reference screenshots. Keep up the good work on the clean CSS refactoring!


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread src/style.css
Comment on lines +24 to +26
'Segoe UI Symbol';
display: flex;
flex-direction: column;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Add margin-bottom: 20px to create the required 20px gap between search bars. Currently, the first search bar has margin: 20px auto 0 with no bottom margin, resulting in 0px gap between the two forms.

Copy link
Copy Markdown

@Anton-Kuchmasov Anton-Kuchmasov left a comment

Choose a reason for hiding this comment

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

Well done!

But please - in futher tasks, don't forget to deploy last version of your solution before opening a new PR

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