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 solution #4905

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

add solution #4905

wants to merge 1 commit into from

Conversation

save-v
Copy link

@save-v save-v commented Oct 20, 2024

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 SCSS files! 🎉 The issues noted are minor style inconsistencies that don't affect the functionality. Consider adjusting the spacing and nesting for improved code style in future updates. Keep up the good work!

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


@include blocks-width;

&_label {

Choose a reason for hiding this comment

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

It seems like the selector for &_label is nested under &__price. Ensure that this is intentional and aligns with your design requirements. If &_label is meant to be a standalone element, consider adjusting its placement.

color: $second-text-color;
}

&_value {

Choose a reason for hiding this comment

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

Similar to the previous comment, verify that &_value is correctly nested under &__price. If it should be a separate element, you might want to adjust its nesting.

margin-right: 4px;
}

&--1 :nth-child(-n + 1) {

Choose a reason for hiding this comment

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

There is an extra space between '&--1' and ':nth-child(-n + 1)'. According to the code style rules, there should be no space between the element and the pseudo-class.

background-image: url(../images/star-active.svg) !important;
}

&--2 :nth-child(-n + 2) {

Choose a reason for hiding this comment

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

There is an extra space between '&--2' and ':nth-child(-n + 2)'. According to the code style rules, there should be no space between the element and the pseudo-class.

background-image: url(../images/star-active.svg);
}

&--3 :nth-child(-n + 3) {

Choose a reason for hiding this comment

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

There is an extra space between '&--3' and ':nth-child(-n + 3)'. According to the code style rules, there should be no space between the element and the pseudo-class.

background-image: url(../images/star-active.svg);
}

&--4 :nth-child(-n + 4) {

Choose a reason for hiding this comment

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

There is an extra space between '&--4' and ':nth-child(-n + 4)'. According to the code style rules, there should be no space between the element and the pseudo-class.

background-image: url(../images/star-active.svg);
}

&--5 :nth-child(-n + 5) {

Choose a reason for hiding this comment

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

There is an extra space between '&--5' and ':nth-child(-n + 5)'. According to the code style rules, there should be no space between the element and the pseudo-class.

Copy link

@VolodymyrKirichenko VolodymyrKirichenko left a comment

Choose a reason for hiding this comment

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

Overall - good, but let's make some fixes 🥹

Comment on lines +33 to +44
<img
class="product-card__image"
src="images/imac.jpeg"
alt="iMac Image"
/>
<a
class="product-card__name"
href="#"
>
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</a>
<p class="product-card__code">Product code: 195434</p>

Choose a reason for hiding this comment

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

don't forget about indents. It will be more readable

Suggested change
<img
class="product-card__image"
src="images/imac.jpeg"
alt="iMac Image"
/>
<a
class="product-card__name"
href="#"
>
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</a>
<p class="product-card__code">Product code: 195434</p>
<img
class="product-card__image"
src="images/imac.jpeg"
alt="iMac Image"
/>
<a
class="product-card__name"
href="#"
>
APPLE A1419 iMac 27" Retina 5K Monoblock (MNED2UA/A)
</a>
<p class="product-card__code">Product code: 195434</p>

Comment on lines +1 to +7
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
font-family: Roboto, sans-serif;
}

Choose a reason for hiding this comment

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

don't use positioning on body tag. Use a separate class - .body for it

Suggested change
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
font-family: Roboto, sans-serif;
}
body {
margin: 0;
padding: 0;
font-family: Roboto, sans-serif;
}

@@ -0,0 +1,109 @@
body {

Choose a reason for hiding this comment

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

u can move it to reset.scss file in which u will be reset values ​​and only this

}

.product-card {
background-color: #fff;

Choose a reason for hiding this comment

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

create variables for all colors

font-weight: 400;
line-height: 14px;
color: $second-text-color;
margin: 4px 0 0;

Choose a reason for hiding this comment

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

margin top?

Comment on lines +6 to +8
background-image: url(../images/star.svg);
background-repeat: no-repeat;
background-position: center;

Choose a reason for hiding this comment

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

u can use just background. Check doc - background

Suggested change
background-image: url(../images/star.svg);
background-repeat: no-repeat;
background-position: center;
background: .......

Comment on lines +14 to +32
&--1 :nth-child(-n + 1) {
background-image: url(../images/star-active.svg) !important;
}

&--2 :nth-child(-n + 2) {
background-image: url(../images/star-active.svg);
}

&--3 :nth-child(-n + 3) {
background-image: url(../images/star-active.svg);
}

&--4 :nth-child(-n + 4) {
background-image: url(../images/star-active.svg);
}

&--5 :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.

  1. Never use !important !!!
    this may lead to conflicts in the future
  2. U can modify ur syntax
Suggested change
&--1 :nth-child(-n + 1) {
background-image: url(../images/star-active.svg) !important;
}
&--2 :nth-child(-n + 2) {
background-image: url(../images/star-active.svg);
}
&--3 :nth-child(-n + 3) {
background-image: url(../images/star-active.svg);
}
&--4 :nth-child(-n + 4) {
background-image: url(../images/star-active.svg);
}
&--5 :nth-child(-n + 5) {
background-image: url(../images/star-active.svg);
}
&--1 :nth-child(1),
&--2 :nth-child(-n + 2),
&--3 :nth-child(-n + 3),
&--4 :nth-child(-n + 4),
&--5 :nth-child(-n + 5) {
background-image: url(../images/star-active.svg);
}

color: $main-text-color;
margin-top: 40px;

@include blocks-width;

Choose a reason for hiding this comment

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

this is not correct. Don't hardcode ur width. This must be a dynamic value
For all the cases!

Suggested change
@include blocks-width;
width: 100%

Comment on lines +3 to +6
$card-border-width: 1px;
$card-padding: 16px;
$card-width: 200px;
$blocks-width: 166px;

Choose a reason for hiding this comment

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

u don't need this variables. It doesn't make sense

Suggested change
$card-border-width: 1px;
$card-padding: 16px;
$card-width: 200px;
$blocks-width: 166px;

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.

3 participants