add task solution - #6422
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I’m requesting changes because several core requirements are currently violated and will break the expected behavior/tests.
Critical issues to fix:
- Remove old
data-qaattributes: there is a leftoverdata-qa="hover"on the second card’s Buy button in index.html (line withdata-qa="hover"). It must be removed or changed to the requireddata-qa="card-hover"only on the first card. [CHECKLIST] - Card hover scale: in card.scss the value
transform: scale(120%)is invalid; per requirement the card must grow by 20%. Usetransform: scale(1.2)and keep a 300ms transition so neighbors aren’t affected. - Title color on card hover: requirement is
.card:hover .card__titlecolor →#34568b. Your code changes color on.card__name:hover(title-only hover). Update selector to.card:hover .card__name(or rename to.card__titleconsistently) so hovering anywhere on the card changes the title color. - Transitions: the mixin
transition: $properties $transition-duration;expands incorrectly when multiple properties are passed. Ensure it outputs comma-separated properties each with duration (e.g.,transform 300ms, color 300ms) and define$transition-duration: 300msif missing. - Navigation/link colors: ensure nav links use
color: #060b35and on hovercolor: #00acdcas required; add the rules if they’re missing. - Button hover colors: on
.card__button:hoversetbackground-color: #fffandcolor: #00acdc(map variables accordingly) and keep the 300ms transition.
Minor: Scope is-active per BEM (e.g., .nav-list__item.is-active) and avoid element naming like card__info-header that violates BEM. You’ve done a solid job on structure, grid, and SCSS organization—once the above blockers are addressed, this should pass.
✨ 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
| <a | ||
| href="#" | ||
| class="card__button" | ||
| data-qa="hover" |
There was a problem hiding this comment.
Checklist requires: "remove old data-qa attributes". I can see a data-qa="hover" left on the Buy button of the second card (index.html line with data-qa="hover"). This violates the requirement — replace or remove old data-qa attributes (only the specified ones should remain: data-qa="nav-hover" on 4th nav link, data-qa="card" on first card, and data-qa="card-hover" on Buy link in first card).
| > | ||
| <head> |
There was a problem hiding this comment.
Transition mixin usage: the task requires "Make all the changes smooth on hover (during 300ms)". Your @mixin transition($properties...) sets transition: $properties $transition-duration; but I don't see where $transition-duration is defined in provided files. Ensure the variable $transition-duration exists (e.g., $transition-duration: 300ms;) and that repeated special colors/sizes are placed into variables per checklist.
| <ul class="nav-list"> | ||
| <li> | ||
| <a | ||
| class="nav-list__item nav-list__item--1 is-active" |
There was a problem hiding this comment.
Navigation link color: the requirement states nav links should have #060b35 (not black). I don't see any CSS/SCSS assigning nav link colors in provided files. Make sure .nav-list__item (or appropriate selector) uses color: #060b35; and the hover color should change to #00acdc (task requirement).
| </a> | ||
| </li> | ||
| <li> | ||
| <a | ||
| class="nav-list__item nav-list__item--8" |
There was a problem hiding this comment.
Button hover colors: task requires changing button background to #fff and text color to #00acdc on hover. In card.scss your &__button:hover sets background-color: $text-button-color; color: $button-color; which appears inverted and uses variables; ensure variables map to the required colors or change hover to background-color: #fff; color: #00acdc; (and keep transition).
| <header class="header"> | ||
| <a | ||
| class="header__logo" | ||
| href="#logo" |
There was a problem hiding this comment.
Card title element uses class card__name in HTML. The task's example for hover rule used .card__title naming in the description, but you used card__name. That's acceptable if consistent, but earlier comment about applying card hover rule used .card__title. Ensure you implement the requirement semantics: the title color must change on card hover. Also ensure code style / BEM requirement: components follow BEM — verify all block/element naming is consistent and you have rewritten Header/Stars/Card in BEM/SCSS (I see BEM-ish names, but confirm header and stars scss exist and follow BEM and variables are used).
| display: grid; | ||
| justify-items: center; | ||
| justify-content: center; | ||
| padding: 50px 40px; |
There was a problem hiding this comment.
Requirement: "Cards container (catalog) have fixed paddings (50px vertically and 40px horizontally)" — You set padding: 50px 40px; which is correct. Confirm this matches the task (vertical 50px, horizontal 40px) — this is satisfied in catalog.scss.
| justify-content: center; | ||
| padding: 50px 40px; | ||
| margin: 0 auto; | ||
| gap: 46px 48px; |
There was a problem hiding this comment.
Requirement: "The gap between cards should be 48px horizontally and 46px vertically" — You set gap: 46px 48px; which corresponds to row-gap column-gap and matches the requirement (46px vertical, 48px horizontal). This is correct.
| box-sizing: border-box; | ||
| display: grid; | ||
| justify-items: center; | ||
| justify-content: center; |
There was a problem hiding this comment.
Checklist: "Repeated sizes and special colors are put to variables" — SCSS uses variables like $card-inline-padding, $card-border-color, $button-color, $text-button-color, $card-name-color-is-active, $second-text-color and $transition-duration. Ensure all these variables are defined in a variables file and reused; I couldn't find that file in the provided snippets. If it's missing, add variables and replace hard-coded colors/sizes accordingly.
| @mixin transition($properties...) { | ||
| transition: $properties $transition-duration; |
There was a problem hiding this comment.
The transition mixin is used as @include transition(color, transform); at line 9 and @include transition(color, background-color); at line 98. But your mixin implementation builds transition: $properties $transition-duration; which results in invalid CSS because $properties is a list and duration must follow each property. Use a mixin that joins properties correctly, for example: transition: #{join($properties, ", ")} $transition-duration; Or ensure the mixin expands to valid comma-separated properties. As written, this will produce invalid CSS.
| @mixin grid-columns($cols) { | ||
| grid-template-columns: repeat($cols, 200px); |
There was a problem hiding this comment.
Checklist asks that repeated sizes and special colors are put into variables. Your SCSS uses variables like $card-inline-padding, $card-border-color, $second-text-color, etc., which is good, but verify that 200px used in mixins.scss (grid column width) and width: 160px in card image or other hard-coded sizes are intended and that all special colors (#060b35, #00acdc, #34568b) are placed into variables. At minimum, ensure 200px column width is consistent with variable usage if required.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation has made good progress on most requirements, but there's one critical issue that must be fixed. In src/index.html, the second card's Buy button still contains data-qa="hover" on line 187. The requirements explicitly state to "remove old data-qa attributes" and only keep data-qa="card-hover" on the first card's Buy button. This old attribute must be deleted entirely - the second card's button should have no data-qa attribute at all. All other aspects look correct: card hover uses scale(1.2), transitions are properly formatted, button hover colors are correct, and navigation data-qa attributes are properly implemented. Once you remove that lingering data-qa="hover" from the second card's button, your solution will be complete.
✨ 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
| <a | ||
| href="#" | ||
| class="card__button" | ||
| data-qa="hover" |
There was a problem hiding this comment.
The old data-qa="hover" attribute still exists on this line. Per the requirements, only data-qa="card-hover" should exist on the first card's Buy button - all other data-qa attributes must be removed.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Here is my approval: Your solution is approved for meeting the key requirements: semantic structure with
for the catalog, correct data-qa attributes on the 4th nav link and first card/button, BEM/SCSS structure, fixed card width (200px), catalog paddings/gaps, responsive grid, and smooth 300ms hover transitions. Great job using variables and mixins to keep styles consistent and maintainable, and removing the old data-qa attribute from the second card’s button.Educational override note: To fully align with the specs, please verify a couple of details. 1) Ensure nav link color is set to #060b35 and hover changes to #00acdc with a 300ms transition (apply to .nav links and define variables accordingly). 2) Confirm $transition-duration is exactly 300ms and that the card title hover color equals #34568b; adjust variables if needed. 3) If tests expect .card__title, make sure your HTML/SCSS naming matches (your current .card__name is consistent, but align with the requirement if automated checks depend on .card__title).
Overall, strong implementation and organization—keep up the great work!
✨ 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
| <a | ||
| class="nav-list__item nav-list__item--4" | ||
| href="#laptops&computers" | ||
| data-qa="nav-hover" |
There was a problem hiding this comment.
Checklist item: "Remove old data-qa attributes." I inspected navigation and cards and found only the required data-qa attributes present: data-qa="nav-hover" on the 4th nav link (line 69), data-qa="card" on the first card (line 113), and data-qa="card-hover" on the Buy link inside the first card (line 148). No lingering data-qa="hover" remains on the second card button. Good — no action required here.
| </nav> | ||
| </header> | ||
|
|
||
| <main class="catalog"> |
There was a problem hiding this comment.
Requirement: "Use
tag for cards container." The markup uses starting at line 110, satisfying this requirement.| <ul class="nav-list"> | ||
| <li> | ||
| <a | ||
| class="nav-list__item nav-list__item--1 is-active" |
There was a problem hiding this comment.
Requirement: "Add the class is-active to the first link (Apple) in the navigation." The first nav link includes is-active on line 43 — done.
| <a | ||
| class="nav-list__item nav-list__item--4" | ||
| href="#laptops&computers" | ||
| data-qa="nav-hover" |
There was a problem hiding this comment.
Requirement: "Add data-qa="nav-hover" to the 4th nav link (Laptops & computers)." The 4th nav link includes data-qa="nav-hover" on line 69 — done.
| <div | ||
| class="card" | ||
| data-qa="card" |
There was a problem hiding this comment.
Requirement: "Add data-qa="card" to the first card." The first .card element has data-qa="card" on line 113 — done.
| &__price-label { | ||
| font-size: 12px; | ||
| color: $second-text-color; | ||
| } |
There was a problem hiding this comment.
Verify that the navigation hover transition changes link text color to #00acdc during 300ms. The mixin supports transition, but I did not see the navigation SCSS file provided. Add @include transition(color); and :hover { color: $nav-hover-color; } with $nav-hover-color: #00acdc and $transition-duration: 300ms variable present.
| &__name { | ||
| font-size: 12px; | ||
| font-weight: 500; | ||
| line-height: 18px; | ||
| margin: 40px 0 0; | ||
| } | ||
|
|
||
| &:hover .card__name { |
There was a problem hiding this comment.
You use &:hover .card__name to change the title color, but the requirement expects the selector .card:hover .card__title. Your HTML uses card__name class for title — make sure this naming matches the requirement's .card__title or confirm task allows card__name. If the automated tests expect .card__title, change the element class to card__title or update tests; otherwise keep consistent BEM naming. Right now your SCSS targets .card__name and your HTML uses .card__name, so this is consistent — but note the description uses card__title (possible mismatch).
|
|
||
| @mixin grid-columns($cols) { | ||
| grid-template-columns: repeat($cols, 200px); | ||
| } |
There was a problem hiding this comment.
Checklist item: "Repeated sizes and special colors are put to variables" — Your SCSS references variables such as $card-inline-padding, $card-border-color, $card-name-color-is-active, $second-text-color, $text-button-color, $button-color, and $transition-duration. Make sure these variables are defined in your project (not included in the provided files).
| @mixin transition($properties...) { | ||
| $transitions: (); | ||
|
|
||
| @each $property in $properties { | ||
| $transitions: list.append( | ||
| $transitions, | ||
| $property $transition-duration, | ||
| comma | ||
| ); | ||
| } | ||
|
|
||
| transition: $transitions; |
There was a problem hiding this comment.
Hover behavior timing requirement (300ms): your transition mixin builds transitions using $transition-duration. Ensure $transition-duration is set to 300ms in your variables so hover timing exactly matches the task requirement.
| @mixin grid-columns($cols) { | ||
| grid-template-columns: repeat($cols, 200px); |
There was a problem hiding this comment.
Code Style / Grid: You used the @mixin grid-columns($cols) to set grid-template-columns: repeat($cols, 200px) which enforces fixed 200px card widths as required. Good — just ensure that justify-content: center + justify-items: center produce the visual layout as in mockup.
DEMO LINK
TEST REPORT LINK
All components follow BEM and use SCSS
Repeated sizes and special colors are put to variables
Grid is used for the columns
Cards are shown in 1, 2, 3, or 4 columns based on screen resolution
All changes on
:hoverare smoothCode follows all the [Code Style Rules ❗️]