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

Develop #4932

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Develop #4932

wants to merge 2 commits into from

Conversation

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

You've done a great job so far! 👍 However, there are some minor issues with the semantics and formatting of your HTML code that need to be addressed. Don't worry, these are common areas everyone needs to improve on when they're learning. Keep up the good work! 😊

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

src/index.html Outdated
Comment on lines 17 to 58
<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>
</div>
<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>
</div>
<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>
</div>
<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>
</div>
<div class="stars stars--4">
<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>
</div>
<div class="stars stars--5">
<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>
</div>

Choose a reason for hiding this comment

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

The div tags are not semantic. Consider using semantic tags where possible. For example, you might want to use section tags to wrap each group of stars. Semantic tags like header, section, article, p improve your page SEO and help screen readers. div and span do not have any meaning.

src/index.html Outdated
Comment on lines 23 to 29
</div>
<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.

There should be an empty line between multiline sibling blocks of HTML. This adds some 'air' and simplifies reading. But don't add them between parent and child elements.

Comment on lines +2 to +5
body {
margin: 0;
padding: 0;
}

Choose a reason for hiding this comment

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

According to the checklist, you should avoid using tag names for styling (except html and body). In this case, you are styling the body tag, which is acceptable. However, be mindful not to use other tag names for styling in the future.

Comment on lines +7 to +9
.stars {
display: flex;
}

Choose a reason for hiding this comment

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

The .stars class is used correctly here. It is a good practice to name your classes according to their function or the content they represent, as you have done here.

Comment on lines +11 to +18
.stars__star {
width: 16px;
height: 16px;

background: url(images/star.svg) no-repeat center;

margin-right: 4px;
}

Choose a reason for hiding this comment

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

The .stars__star class is also used correctly. You have followed the BEM naming convention, which is a good practice for writing maintainable and scalable CSS. However, remember to avoid fixing container size unless it is necessary for the design. In this case, you have set a fixed width and height for the .stars__star class. Ensure that this is required for your design.

Comment on lines +20 to +26
.stars--1 .stars__star:nth-child(1),
.stars--2 .stars__star:nth-child(-n + 2),
.stars--3 .stars__star:nth-child(-n + 3),
.stars--4 .stars__star:nth-child(-n + 4),
.stars--5 .stars__star:nth-child(-n + 5) {
background-image: url('images/star-active.svg');
}

Choose a reason for hiding this comment

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

You have used the nth-child pseudo-class correctly to style individual stars based on their order. This is a good use of CSS selectors to achieve the desired effect without adding extra classes or ids in your HTML.

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.

Great job on your code! It's well structured and properly formatted. Just a small note for the future - try to avoid using tag names for styling (except html and body). It's a good practice to add a specific class to the element and style it. Keep up the good work! 🚀

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

body {
margin: 0;
padding: 0;
}

Choose a reason for hiding this comment

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

According to the checklist, you should not use tag names for styling (except html and body). It's better to add a specific class to the body and style it.

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