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

stars making #4875

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

stars making #4875

wants to merge 2 commits into from

Conversation

RiTAnd
Copy link

@RiTAnd RiTAnd commented Sep 30, 2024

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

Hey there! 👋 It looks like we need to address a few important layout and code quality issues before we can move forward. Using fixed sizes and tag names for styling might cause some trouble down the line, especially when it comes to responsiveness and maintainability. Also, don't forget to add those empty lines for better readability and to adjust your indentation for a cleaner look. Keep up the good work, and with a bit of tweaking, your code will be top-notch! 💪

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

@@ -13,6 +13,52 @@
/>
</head>
<body>

Choose a reason for hiding this comment

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

The tag should be indented with 2 spaces from the opening tag to maintain proper nesting structure.

@@ -13,6 +13,52 @@
/>

Choose a reason for hiding this comment

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

The attributes of the tag should be on separate lines with 2-space indentation for consistency and readability, as per the checklist guidelines.

<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
</ul>

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. There should be an empty line before the second

    element.

<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
</ul>

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. There should be an empty line before the third

    element.

<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
</ul>

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. There should be an empty line before the fourth

    element.

<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
</ul>

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. There should be an empty line before the sixth

    element.

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

Choose a reason for hiding this comment

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

Don't use tag names for styling (except html and body). You can remove these styles as they are typically default for browsers, or if needed, apply them to the body tag instead.

Comment on lines +7 to +12
.stars {
display: flex;
position: relative;
width: 96px;
top: 22px;
left: 22px;

Choose a reason for hiding this comment

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

Don't fix container size (if there is no such a requirement). Setting a fixed width may cause issues with responsiveness. Consider using max-width or a more responsive size unit like percentages or viewport units if needed.

.stars {
display: flex;
position: relative;
width: 96px;

Choose a reason for hiding this comment

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

Remember to use fallback fonts - alternative font-family in case the main one doesn't work. Although not directly visible in this snippet, ensure that your font-family declarations throughout your CSS include fallback options.

Comment on lines +34 to +57
.stars--1__star:nth-child(1) {
top: 42px;
left: 22px;
}

.stars--1__star:nth-child(2) {
top: 62px;
left: 42px;
}

.stars--1__star:nth-child(3) {
top: 82px;
left: 62px;
}

.stars--1__star:nth-child(4) {
top: 102px;
left: 82px;
}

.stars--1__star:nth-child(5) {
top: 122px;
left: 102px;
}

Choose a reason for hiding this comment

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

It looks like you're trying to position elements individually, which could lead to maintenance issues in the future. Consider using a more dynamic approach such as flexbox or grid layout to position your stars. This will make your code more maintainable and responsive.

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 the Pull Request! There are a few minor issues to address, such as the BEM notation and some styling best practices, but these don't critically impact the functionality or security of your code. Keep up the good work, and consider these points for future improvements to enhance the quality of your code! 😊👍

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

Comment on lines +17 to +73
<ul class="stars stars--0">

<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>

</ul>

<ul class="stars stars--1">

<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>

</ul>

<ul class="stars stars--2">

<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>

</ul>

<ul class="stars stars--3">

<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>

</ul>

<ul class="stars stars--4">

<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>

</ul>

<ul class="stars stars--5">

<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>
<li class="stars__star"></li>

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. There should be an empty line between each

    block to improve readability.

Comment on lines +7 to +12
.stars {
display: flex;
position: relative;
width: 96px;
top: 22px;
left: 22px;

Choose a reason for hiding this comment

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

You're setting fixed sizes with 'width', 'top', and 'left' properties. If there is no such requirement, consider using sizes that are relative to the content or parent element to prevent overflow or accidental scroll bars.

Comment on lines +15 to +22
.stars__star {
display: inline-block;
margin-right: 5px;
width: 16px;
height: 16px;
background-image: url(images/star.svg);
background-size: contain;
background-repeat: no-repeat;

Choose a reason for hiding this comment

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

It's good to see that you have a separate class for styling stars. However, avoid using the 'margin-right' property on the last child element as it can cause unnecessary spacing. Consider using the ':not(:last-child)' pseudo-class to apply the margin to all except the last child.

Comment on lines +34 to +47
.stars--1__star:nth-child(1) {
top: 42px;
left: 22px;
}

.stars--1__star:nth-child(2) {
top: 62px;
left: 42px;
}

.stars--1__star:nth-child(3) {
top: 82px;
left: 62px;
}

Choose a reason for hiding this comment

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

The classes '.stars--1__star' seem to be a typo or incorrect BEM notation. If these are meant to be modifiers, they should be using the single dash notation like '.stars--1 .stars__star' and not double underscore. Also, ensure that you're not styling by tag names as per the checklist.

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