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

solution #4856

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

solution #4856

wants to merge 1 commit into from

Conversation

skrudj98
Copy link

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.

Everything looks great! Your CSS for the .stars class is minimal and correct, and your CSS imports are well-organized. Keep up the good work with maintaining a clean structure for your styles! 🌟👍

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

@@ -9,10 +9,51 @@
<title>Stars</title>
<link

Choose a reason for hiding this comment

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

Attributes of the link tag should start each on a new line with 2-space indentation related to the tag to keep the attributes correctly formatted.

Comment on lines +16 to +21
<div class="stars stars--0">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>

Choose a reason for hiding this comment

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

Add an empty line between sibling blocks of HTML to simplify reading, but don't add them between parent and child elements.

Comment on lines +23 to +28
<div class="stars stars--1">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>

Choose a reason for hiding this comment

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

Add an empty line between sibling blocks of HTML to simplify reading, but don't add them between parent and child elements.

Comment on lines +30 to +35
<div class="stars stars--2">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>

Choose a reason for hiding this comment

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

Add an empty line between sibling blocks of HTML to simplify reading, but don't add them between parent and child elements.

Comment on lines +37 to +42
<div class="stars stars--3">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>

Choose a reason for hiding this comment

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

Add an empty line between sibling blocks of HTML to simplify reading, but don't add them between parent and child elements.

background-image: url(../../images/star-active.svg);
width: 13px;
height: 12.2px;
margin-left: 22px;

Choose a reason for hiding this comment

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

The first star has a different margin-left value compared to the others. Ensure this is intentional. If all stars are supposed to be evenly spaced, this value should be consistent with the margin-left of other stars.

@@ -0,0 +1,44 @@
.stars--4 {
display: flex;
margin-top: 4px;

Choose a reason for hiding this comment

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

Be consistent with your margins. It's recommended to add only top or bottom margins, but not both, to avoid potential margin collapse issues.

display: block;
background-image: url(../../images/star-active.svg);
width: 13px;
height: 12.2px;

Choose a reason for hiding this comment

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

Consider using a class for common styles to avoid repetition. Each .stars__star has the same display, background-image, width, and height properties. You can extract these to a single class to make your CSS more maintainable.

background-image: url(../../images/star-active.svg);
width: 13px;
height: 12.2px;
margin-left: 22px;

Choose a reason for hiding this comment

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

The margin-left for the first star creates an inconsistency with the rest of the stars. According to the checklist, be consistent with your margins. If there's no specific requirement for the first star to have a different margin, it should be the same as the others.

Comment on lines +6 to +44
.stars--5 .stars__star:nth-child(1) {
display: block;
background-image: url(../../images/star-active.svg);
width: 13px;
height: 12.2px;
margin-left: 22px;
}

.stars--5 .stars__star:nth-child(2) {
display: block;
background-image: url(../../images/star-active.svg);
width: 13px;
height: 12.2px;
margin-left: 4px;
}

.stars--5 .stars__star:nth-child(3) {
display: block;
background-image: url(../../images/star-active.svg);
width: 13px;
height: 12.2px;
margin-left: 4px;
}

.stars--5 .stars__star:nth-child(4) {
display: block;
background-image: url(../../images/star-active.svg);
width: 13px;
height: 12.2px;
margin-left: 4px;
}

.stars--5 .stars__star:nth-child(5) {
display: block;
background-image: url(../../images/star-active.svg);
width: 13px;
height: 12.2px;
margin-left: 4px;
}

Choose a reason for hiding this comment

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

To improve the maintainability of the code, consider using a single CSS rule for the .stars__star elements that share the same styles. You can then override the margin-left for the first child if it needs to be different.

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