Skip to content

Develop#6591

Open
Rodrik31 wants to merge 4 commits intomate-academy:masterfrom
Rodrik31:develop
Open

Develop#6591
Rodrik31 wants to merge 4 commits intomate-academy:masterfrom
Rodrik31:develop

Conversation

@Rodrik31
Copy link

@Rodrik31 Rodrik31 commented Mar 9, 2026

  • DEMO LINK

  • TEST REPORT LINK

  • Yellow stars are added with container modifier + pseudo-selector (NO extra classes)

  • Each BEM block has its own separate file

  • All Typical Mistakes from BEM lesson theory are checked.

  • Code follows all the Code Style Rules ❗️

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.

Review Summary

Great work on this task! Your solution is approved as it meets all the core functional requirements. The HTML is well-structured, and the BEM implementation is excellent.

While your code works perfectly, there are a few opportunities to make the CSS more concise. In active-stars.css and stars.css, you have several repeated properties like padding and background-image across different modifier classes. You can refactor this by grouping selectors or moving common styles to the base class to avoid repetition. This practice, known as DRY (Don't Repeat Yourself), is key for writing maintainable code.

Keep up the excellent work!


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

Footnotes

  1. Rate AI review example

Comment on lines +13 to +19
margin-left: 4px;
margin-right: 4px;
}

.stars__star:first-child {
margin-left: 0;
}

Choose a reason for hiding this comment

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

Using both margin-left and margin-right to create space between flex items, combined with an override for the first child, is a bit complex. A cleaner approach is to apply a margin to only one side of the elements. For example, you could apply margin-left to all stars except the first one using the :not(:first-child) pseudo-class or the adjacent sibling selector (+). This would simplify the code and avoid adding unwanted space on the right side of the last star.

Comment on lines +21 to +49
.stars--0 {
padding-top: 2px;
padding-bottom: 2px;
}

.stars--1 {
padding-top: 2px;
padding-bottom: 2px;
}

.stars--2 {
padding-top: 2px;
padding-bottom: 2px;
}

.stars--3 {
padding-top: 2px;
padding-bottom: 2px;
}

.stars--4 {
padding-top: 2px;
padding-bottom: 2px;
}

.stars--5 {
padding-top: 2px;
padding-bottom: 2px;
}

Choose a reason for hiding this comment

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

These CSS rules are duplicated for all modifiers from --0 to --5. This code can be made more concise by applying the padding directly to the main .stars class, if it's needed for all star blocks.

However, the requirement states, "Don't add vertical margins between blocks." Adding vertical padding creates space between the blocks, which seems to go against the spirit of this requirement. Please review if this padding is necessary.

Comment on lines +1 to +24
.stars--1 .stars__star:nth-of-type(-n + 1) {
background-image: url('./../../images/star-active.svg');
background-repeat: no-repeat;
}

.stars--2 .stars__star:nth-of-type(-n + 2) {
background-image: url('./../../images/star-active.svg');
background-repeat: no-repeat;
}

.stars--3 .stars__star:nth-of-type(-n + 3) {
background-image: url('./../../images/star-active.svg');
background-repeat: no-repeat;
}

.stars--4 .stars__star:nth-of-type(-n + 4) {
background-image: url('./../../images/star-active.svg');
background-repeat: no-repeat;
}

.stars--5 .stars__star:nth-of-type(-n + 5) {
background-image: url('./../../images/star-active.svg');
background-repeat: no-repeat;
}

Choose a reason for hiding this comment

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

These rules are quite repetitive. You can make your code more concise and maintainable by following the DRY (Don't Repeat Yourself) principle:

  1. The background-repeat: no-repeat; property is redundant here because it's already defined for all stars in stars.css.
  2. Since the background-image is the same for all active stars, you can group all the selectors (from .stars--1 to .stars--5) into a single rule to set this property just once.

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