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

card #5261

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

card #5261

wants to merge 3 commits into from

Conversation

dvdmsk
Copy link

@dvdmsk dvdmsk commented Feb 1, 2025

  • DEMO LINK

  • TEST REPORT LINK

  • there 2 BEM blocks card and stars each in their own file

  • SCSS Nesting is used for elements, modifiers and pseudo-classes

  • SCSS Variables are used for main values and placed in a separate file

  • all stars--N modifiers work as expected (Highlight first N stars)

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

Your code is on the right track, but there are a few important changes needed to fully meet the task requirements. Please move the SCSS variables to a separate file, create individual SCSS files for the card and stars BEM blocks, and ensure your code adheres to the specified code style rules. These adjustments will help improve the maintainability and organization of your project. Keep up the great work, and I'm confident you'll nail it with these tweaks! 😊

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

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

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.

Review Summary

Great job on your progress so far! 🎉 Your HTML structure is well-organized, and your use of BEM naming conventions in SCSS is effective. However, there are a few areas to improve:

  1. SCSS Variables File: Please move the SCSS variables from the index.scss file to a dedicated variables file. This will enhance maintainability.

  2. Separate SCSS Files for BEM Blocks: Create individual SCSS files for the card and stars BEM blocks instead of defining them in index.scss. This will help in organizing your styles better.

  3. Code Style Rules: Ensure adherence to all specified code style rules, including proper indentation and naming conventions.

These improvements are crucial for maintaining clean and organized code. Addressing these issues will also help you avoid similar problems in the future. Keep up the good work, and continue learning from these experiences! 🚀

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

Comment on lines 1 to 4
:root {
--main-black: #060b35;
--main-grey: #616070;
}

Choose a reason for hiding this comment

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

Consider moving these SCSS variables to a separate file to improve maintainability and organization, as suggested in the previous review.

Comment on lines 27 to 116
.card {
width: 200px;
margin: 0 auto;
background-color: #fff;
padding: 32px 16px 16px;
border-radius: 5px;
border: 1px solid #f3f3f3;

&__image {
display: block;
width: 160px;
height: 134px;
margin-bottom: 40px;
margin-right: auto;
margin-left: auto;
}

&__title {
font-weight: 500;
font-size: 12px;
line-height: 18px;
margin-bottom: 4px;
}

&__code {
font-weight: 400;
font-size: 10px;
line-height: 14px;
color: var(--main-grey);
margin-bottom: 16px;
}

&__rate {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24px;

.review {
padding-top: 2px;
font-weight: 400;
font-size: 10px;
line-height: 14px;
text-align: right;
display: flex;
align-items: center;
align-self: center;
}
}

&__price {
display: flex;
justify-content: space-between;
font-weight: 400;
font-size: 12px;
line-height: 18px;
color: var(--main-grey);
margin-bottom: 16px;

& span {
font-weight: 700;
font-size: 16px;
line-height: 18px;
color: var(--main-black);
}
}

&__btn {
display: block;
height: 40px;
font-weight: 700;
font-size: 14px;
line-height: 16px;
padding: 12px 70px 12px 69px;
background-color: #00acdc;
color: #fff;
border-radius: 5px;
text-transform: uppercase;
box-sizing: border-box;
transition: none;

&:hover {
border: 1px solid #00acdc;
background-color: #fff;
color: #00acdc;
height: 40px;
padding: 11px 69px 11px 68px;
}
}
}

Choose a reason for hiding this comment

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

It's recommended to create a separate SCSS file for the card BEM block to adhere to the task requirements and improve code organization.

Comment on lines 118 to 134
.stars {
display: flex;
align-items: center;
&__star {
background-image: url(../images/star.svg);
background-repeat: no-repeat;
background-position: center;
width: 16px;
height: 16px;
margin-right: 4px;
}

@for $i from 1 through 5 {
&--#{$i} :nth-child(-n + #{$i}) {
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.

Consider creating a separate SCSS file for the stars BEM block to enhance maintainability and adhere to the task requirements.

Copy link

@volodymyr-soltys97 volodymyr-soltys97 left a comment

Choose a reason for hiding this comment

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

Great work 🔥

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