-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 #5057
base: master
Are you sure you want to change the base?
add solution #5057
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your hard work on this project! 😊 There are a few critical issues that need to be addressed before we can approve the pull request. The use of the <bottom>
tag in your HTML is not valid and should be replaced with <button>
. Additionally, ensure that all SCSS variables like $main-background-color
, $bold-font-color
, $main-font-color
, and $extra-color
are defined to avoid compilation errors. Lastly, make sure to compile your .scss
files to .css
and update the stylesheet link accordingly, as browsers cannot interpret .scss
files directly. Once these issues are resolved, your code will be in great shape! Keep up the great work! 🚀
✨ 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.
src/index.html
Outdated
<bottom | ||
data-qa="hover" | ||
class="product-card__bottom-buy" | ||
> | ||
BUY | ||
</bottom> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The <bottom>
tag is not a valid HTML element. It should be replaced with <button>
to ensure proper functionality and semantic correctness.
@@ -11,8 +14,54 @@ | |||
rel="stylesheet" | |||
href="./styles/index.scss" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stylesheet link references an .scss
file. Ensure that this file is compiled to a .css
file and the link is updated accordingly, as browsers cannot directly interpret .scss
files.
box-sizing: border-box; | ||
padding-inline: 16px; | ||
width: 200px; | ||
background-color: $main-background-color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the variable $main-background-color
is defined in your SCSS files. Otherwise, this will cause a compilation error.
line-height: 18px; | ||
text-align: left; | ||
font-weight: 500; | ||
color: $bold-font-color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the variable $bold-font-color
is defined in your SCSS files. Otherwise, this will cause a compilation error.
width: 98px; | ||
height: 14px; | ||
line-height: 14px; | ||
color: $main-font-color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the variable $main-font-color
is defined in your SCSS files. Otherwise, this will cause a compilation error.
text-align: center; | ||
line-height: 40px; | ||
height: 40px; | ||
background-color: $extra-color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the variable $extra-color
is defined in your SCSS files. Otherwise, this will cause a compilation error.
src/styles/blocks/card.scss
Outdated
&__bottom-buy { | ||
box-sizing: border-box; | ||
text-align: center; | ||
line-height: 40px; | ||
height: 40px; | ||
background-color: $extra-color; | ||
color: rgba(255, 255, 255, 1); | ||
font-size: 14px; | ||
font-weight: 700; | ||
border-radius: 5px; | ||
margin-top: 16px; | ||
margin-bottom: 16px; | ||
|
||
&:hover { | ||
border: 1px solid $extra-color; | ||
background-color: $main-background-color; | ||
color: $extra-color; | ||
line-height: 38px; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class &__bottom-buy
should be updated to reflect the change from <bottom>
to <button>
in the HTML file to maintain consistency and functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your Pull Request has been approved! 🎉 Great job on addressing the task requirements and constraints. However, there are a few critical issues that need your attention to ensure the functionality of your code:
-
HTML File: The
href
attribute is incorrectly pointing to an SCSS file. Browsers cannot interpret SCSS directly, so make sure to compile your SCSS to CSS and update the link accordingly. -
SCSS Variables: The variables
$main-background-color
,$bold-font-color
,$main-font-color
, and$extra-color
are used but not defined in the file. Ensure these are defined in yourvariables.scss
file to prevent compilation errors.
Despite these issues, your code demonstrates a solid understanding of BEM methodology, Flexbox for layout, and SCSS nesting and variables. The decision to approve is made to help you move forward with your learning. Please review the comments and make the necessary improvements to enhance your code quality. 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! ✨
@@ -11,8 +14,54 @@ | |||
rel="stylesheet" | |||
href="./styles/index.scss" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The href
attribute is pointing to an SCSS file (./styles/index.scss
). Browsers cannot interpret SCSS files directly. You need to compile the SCSS file to a CSS file and update the href
to point to the compiled CSS file.
box-sizing: border-box; | ||
padding-inline: 16px; | ||
width: 200px; | ||
background-color: $main-background-color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable $main-background-color
is used here but it is not defined in this file. Make sure it is defined in a variables file or within this file to avoid compilation errors.
line-height: 18px; | ||
text-align: left; | ||
font-weight: 500; | ||
color: $bold-font-color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable $bold-font-color
is used here but it is not defined in this file. Ensure it is defined to prevent compilation errors.
width: 98px; | ||
height: 14px; | ||
line-height: 14px; | ||
color: $main-font-color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable $main-font-color
is used here but it is not defined in this file. Make sure it is defined to avoid compilation errors.
&__button-buy { | ||
height: 40px; | ||
border: none; | ||
background-color: $extra-color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable $extra-color
is used here but it is not defined in this file. Ensure it is defined to prevent compilation errors.
DEMO LINK
TEST REPORT LINK
there 2 BEM blocks
card
andstars
each in their own fileSCSS Nesting is used for
elements
,modifiers
andpseudo-classes
SCSS Variables are used for main values and placed in a separate file
all
stars--N
modifiers work as expected (Highlight firstN
stars)Code follows all the Code Style Rules ❗️