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 #5112

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

add task solution #5112

wants to merge 2 commits into from

Conversation

MissDragi
Copy link

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


Hello! 😊 You've done a great job with the HTML, CSS, and SCSS files, and most of your code meets the task requirements. However, there are a few critical issues that need to be addressed before we can approve the pull request:

  1. SCSS Variables: The task requires the use of SCSS variables for main values, which should be placed in a separate file. This is currently missing, so please ensure to define and use SCSS variables appropriately.

  2. BEM File Organization: The task specifies that each BEM block (card and stars) should have its own file. Currently, the files are not organized according to BEM methodology. Please separate them into individual files.

  3. Background Image URL: The background-image: url() should be relative to the index.scss and start with ../images. The current implementation uses an absolute path, which needs to be corrected.

  4. SCSS Nesting: There is an incorrect use of the & selector in the SCSS for the stars component. The selector should be .stars--4 .stars__star:nth-child(-n + 4) to correctly target the first four stars.

  5. Unnecessary Files: Since SCSS is being used and compiled by Parcel, the card.css and stars.css files are not needed and should be removed to avoid confusion.

Please address these issues to ensure your code fully meets the task requirements. Keep up the great work, and I'm confident you'll have this sorted out in no time! 🚀

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

Comment on lines 18 to 20
.stars--4 &__star:nth-child(-n + 4) {
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.

The selector '.stars--4 &__star:nth-child(-n + 4)' is incorrect. The '&' should be used to refer to the parent selector, but here it is used incorrectly. It should be '.stars--4 .stars__star:nth-child(-n + 4)' to correctly target the first four stars within an element with the 'stars--4' class.

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 progress! 🎉 Your HTML and SCSS files are well-structured, and you've effectively used BEM methodology. However, there are a few areas to improve:

  1. SCSS Variables: Create a separate file for SCSS variables to manage main values efficiently.
  2. Unnecessary Files: Remove the index.css file to avoid confusion since SCSS is being compiled by Parcel.
  3. Universal Selector: Avoid using the universal selector (*) for resetting margins to prevent performance issues.
  4. Background Image URL: Ensure the background-image: url() path is correct and relative to index.scss.

These adjustments will enhance your code quality. Keep up the great work, and make sure to address these points in future projects to continue improving your skills! 🚀

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

width: 200px;
height: 408px;
background-color: #fff;
background-image: url(../images/imac.jpeg);

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 relative to the index.scss and start with ../images. Please ensure the path is correct as per the task requirements.

Comment on lines +1 to +3
* {
margin: 0;
}

Choose a reason for hiding this comment

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

The use of a universal selector (*) for resetting margins is generally not recommended as it can lead to performance issues. Consider using a more specific selector or a CSS reset/normalize file.

Comment on lines +1 to +122
border-radius: 5px;
padding: 32px 16px 16px;
}

.card__name {
display: flex;
margin-top: 174px;
margin-bottom: 4px;
font-weight: 500;
font-size: 12px;
line-height: 18px;
color: #060b35;
}

.card__name-code {
color: #616070;
font-size: 10px;
line-height: 14px;
margin-bottom: 16px;
}

.card__rate {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}

.card__review {
font-size: 10px;
color: #060b35;
line-height: 14px;
}

.card__price {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}

.card__price-name {
font-size: 12px;
line-height: 18px;
color: #616070;
}

.card__price-value {
font-weight: 700;
color: #060b35;
font-size: 16px;
line-height: 18px;
}

.card__button-action {
display: flex;
box-sizing: border-box;
justify-content: center;
align-items: center;
background-color: #00acdc;
color: #fff;
width: 166px;
height: 40px;
border: 0 solid transparent;
border-radius: 5px;
text-transform: uppercase;
font-weight: 700;
font-size: 14px;
line-height: 16px;
}

.card__button-action:hover {
background-color: transparent;
color: #00acdc;
border: 1px solid #00acdc;
}

.stars {
display: flex;
}

.stars__star {
display: flex;
background-image: url(../images/star.svg);
background-repeat: no-repeat;
background-position: center;
width: 16px;
height: 16px;
margin-right: 4px;
}

.stars__star:last-child {
margin-right: 0;
}

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

/*# sourceMappingURL=index.css.map */

Choose a reason for hiding this comment

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

This file seems to be a compiled CSS file from your SCSS sources. Since you are using SCSS and Parcel for compilation, this file is unnecessary and should be removed to prevent redundancy and potential confusion.

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