Skip to content

Solution#6237

Open
GoatSpirit wants to merge 1 commit into
mate-academy:masterfrom
GoatSpirit:develop
Open

Solution#6237
GoatSpirit wants to merge 1 commit into
mate-academy:masterfrom
GoatSpirit:develop

Conversation

@GoatSpirit
Copy link
Copy Markdown

No description provided.

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'm approving your solution with this educational note. You've done an excellent job implementing the core requirements: proper BEM structure across all components, correct data-qa attributes placement (nav-hover, card, card-hover, is-active), functional responsive grid layout with the right breakpoints, and consistent SCSS usage. However, there are a few consistency issues to address: 1) The transition-duration property should use the shorthand transition syntax for cleaner code; 2) Gap values in index.html (46px, 48px) and star sizes in stars.scss (13.6px, 6.4px) should be added to variables.scss and imported instead of being hardcoded; 3) The :root block with --blue-color in header.scss belongs in index.scss since :root is a global selector; 4) Consider using transform: scale(1.2) translateZ(0) on card hover to prevent potential overlap with neighboring cards. These are minor improvements that will make your code more maintainable and consistent with the checklist requirements.


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

Footnotes

  1. Rate AI review example

Comment thread src/index.html
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossorigin="anonymous"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gap values are hardcoded (46px 48px) instead of using variables. According to checklist item #2, repeated sizes and special colors must be put to variables. The variables.scss file should define these gap values.

Comment thread src/index.html
Comment on lines +100 to +103
>
Photo
</a>
</li>
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 card scales on hover but CSS transform doesn't remove the element from document flow. This means the scaled card will visually overlap with neighboring cards. The requirement states 'neighboring cards should not be affected' - consider using transform with proper positioning to prevent overlap.

Comment thread src/styles/card.scss
Comment on lines +18 to +26
margin: 0 auto 40px;
}

&__title {
margin: 0 0 4px;
font-size: 12px;
line-height: 18px;
font-weight: 500;
color: $main-color;
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 .header__logo img selector is not BEM-compliant. According to BEM methodology, nested element selectors should be avoided. Consider using a proper .header__logo__image class or keeping the styling in .header__logo with an img selector that's scoped properly.

Comment thread src/styles/card.scss
Comment on lines +7 to +9
width: $card-width;
height: $card-height;
border: 1px solid $border-color;
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 :root block defines CSS variable --blue-color: #00acdc while variables.scss already has $blue-color: #00acdc. This creates inconsistency - the checklist requires repeated colors to be put to variables. The header should use the SCSS variable $blue-color imported from variables.scss instead of defining a separate CSS variable.

Comment thread src/styles/card.scss
Comment on lines +92 to +98
text-transform: uppercase;
&:hover {
background-color: $white-color;
color: $blue-color;
height: 38.5px;
transform: scale(1.2);
transition-duration: $transition-duration;
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 hover state has transform: scale(1.2) which conflicts with the parent's .card:hover that also applies transform: scale(1.2). The button transform should be removed - when hovering the card, the card itself scales, and the button hover should only handle its own color/background changes.

Comment thread src/styles/header.scss
Comment on lines +7 to +10

:root {
--blue-color: #00acdc;
}
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 :root block with CSS custom variable --blue-color is placed in header.scss. This should be moved to index.scss or a global stylesheet since :root is a global selector, not component-specific.

Comment thread src/styles/index.scss
Comment on lines +18 to +21
justify-content: center;
gap: 46px 48px;
padding: 50px 40px;
}
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 .header__logo class uses display: flex and position: relative, but since .header__logo is applied to an <img> element (a replaced element), display: flex has no effect. These properties could be removed or the logo image should be wrapped in a container.

Comment thread src/styles/stars.scss
Comment on lines +2 to +3
display: flex;
gap: 6.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 star gap value (6.4px) is hardcoded. According to checklist item #2, repeated sizes must be put to variables. Add a $star-gap variable to variables.scss and use it here.

Comment thread src/styles/stars.scss
Comment on lines +5 to +7
&__star {
width: 13.6px;
height: 13.6px;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Star dimensions (13.6px) are hardcoded in width and height. These repeated sizes should be defined as variables in variables.scss.

Comment thread src/styles/stars.scss
Comment on lines +1 to +10
.stars {
display: flex;
gap: 6.4px;

&__star {
width: 13.6px;
height: 13.6px;
background-image: url(../images/star.svg);
background-repeat: no-repeat;
background-position: center;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Variables.scss is well-structured and contains the core variables for colors, card dimensions, and transitions. Consider adding the missing variables for gap values ($catalog-gap-x: 48px, $catalog-gap-y: 46px) and star sizes ($star-size: 13.6px, $star-gap: 6.4px) used elsewhere.

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