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

add task solution #4865

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

Conversation

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

Hey there! It looks like you're making great progress. 👍 However, I've noticed a few areas that could use some adjustments before we can approve your Pull Request. Here's what we need to address:

  1. Consistency in units for margins - let's stick to one unit, px is fine.
  2. The background-image URL - we should extract this into a custom property for better manageability.
  3. The box-sizing property - it's best to apply this globally to all elements for a consistent box model.
  4. Unused custom properties - let's remove any code that isn't being used to keep things tidy.
  5. Semantic HTML - consider using more descriptive tags like figure and figcaption for the rating stars.
  6. Code formatting - adding some empty lines and proper indentation will make your code easier to read and maintain.

Once these adjustments are made, your code will be in better shape! Keep up the good work and we'll be ready to approve in no time. 😄 Remember, these changes will help make your code more efficient and maintainable in the long run!

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

Comment on lines +16 to +58
<div class="stars-container">
<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.

Add empty lines between multiline sibling blocks of HTML to improve readability.

Comment on lines +17 to +22
<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.

Use semantic tags where possible. For example, if these stars represent a rating, consider wrapping each group in a figure tag with a figcaption describing the rating.

src/style.css Outdated
Comment on lines 2 to 4
:root{
--main-images: (./images/star-active.svg)
}

Choose a reason for hiding this comment

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

The --main-images custom property is defined but never used. If it's intended for use, make sure to implement it where necessary. Otherwise, consider removing unused code to keep the stylesheet clean.

Comment on lines +6 to +10
body {
margin: 0;
padding: 0;
box-sizing: border-box;
}

Choose a reason for hiding this comment

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

The box-sizing: border-box; should be applied globally to all elements for consistency. Move it to a universal selector * at the top of your stylesheet.

Comment on lines +6 to +10
body {
margin: 0;
padding: 0;
box-sizing: border-box;
}

Choose a reason for hiding this comment

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

The body selector is a tag name selector, which is discouraged by the checklist. However, for the body tag, it is commonly accepted to use the tag itself for styling since it's the document's body element. Just ensure that this is the only tag selector used besides html.

Comment on lines +19 to +22
background-image: url(./images/star.svg);
background-position: center;
margin-right: 4px;
background-repeat: no-repeat;

Choose a reason for hiding this comment

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

The background-image URL should be extracted into a custom property since it's reused in multiple places. This will make it easier to manage and update the image path if needed.

height: 16px;
background-image: url(./images/star.svg);
background-position: center;
margin-right: 4px;

Choose a reason for hiding this comment

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

Consider using a consistent unit for margins. If you're using px for widths and heights, you might want to use px for margins as well for consistency, unless there's a specific reason for using 4px here.

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 Pull Request! 🌟 While there are a few minor improvements suggested, like adding empty lines for better readability and adjusting the indentation for consistency, none of these issues are critical and don't impact the functionality or security of your code. Keep these tips in mind for future projects to make your code even better! 👍

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

Comment on lines +16 to +23
<div class="stars-container">
<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>

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 improve readability. For example, add an empty line after line 23.

Comment on lines +24 to +29
<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 improve readability. For example, add an empty line after line 29.

Comment on lines +30 to +35
</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>

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 improve readability. For example, add an empty line after line 35.

Comment on lines +36 to +41
<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>

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 improve readability. For example, add an empty line after line 41.

Comment on lines +42 to +47
<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>

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 improve readability. For example, add an empty line after line 47.

Comment on lines +48 to +53
<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>

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 improve readability. For example, add an empty line after line 53.

Comment on lines +11 to +18
.stars__star {
width: 16px;
height: 16px;
background-image: url(./images/star.svg);
background-position: center;
margin-right: 4px;
background-repeat: no-repeat;
}

Choose a reason for hiding this comment

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

Avoid using tag names for styling. It's better to style elements using classes to ensure that the styles are more modular and avoid potential conflicts with other styles.

For example, instead of styling .stars__star, if there are other star elements in your project that should not have these styles, consider using a more specific class name.

background-repeat: no-repeat;
}

.stars--0 .stars__star:nth-child(-n + 0) {

Choose a reason for hiding this comment

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

The selector .stars--0 .stars__star:nth-child(-n + 0) will never match any elements because nth-child(-n + 0) selects no elements. You can remove this rule if it's not intended to apply any styles.

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