-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Solution of task Calendar #3956
base: master
Are you sure you want to change the base?
Conversation
MannyShussan
commented
Nov 18, 2024
- DEMO LINK
- TEST REPORT LINK
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! 😊 While your code is mostly on the right track, there are a few critical issues that need to be addressed before we can approve the pull request:
-
File Naming and Location: The SCSS file should be named
main.scss
and located in thesrc/styles/
directory as per the task requirements. Please rename and relocate the file accordingly. -
Use of Variables: It's important to refactor repeated
px
values into variables for better readability and maintainability. This will help make your code more efficient and easier to update in the future. -
Specificity Issues: The spaces in your selectors (e.g.,
&--month-length-#{$number} :nth-child(n + #{$number + 1})
) can cause specificity issues. Removing these spaces will ensure that your styles are applied correctly. -
Checklist Compliance: Ensure that changing the 'month-length' and 'start-day' modifiers reflects correctly in the calendar layout. Double-check that these features work as intended.
Please address these issues to ensure your code meets the core requirements of the task. Once these changes are made, your solution will be in great shape! Keep up the great work, and don't hesitate to reach out if you have any questions. 🚀
✨ 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/styles/index.scss
Outdated
} | ||
|
||
@for $number from 1 through 31 { | ||
& :nth-child(#{$number})::before { |
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 selector '& :nth-child(#{$number})::before' might cause specificity issues due to the space before ':nth-child'. Consider removing the space to ensure the styles are applied correctly to the intended elements.
src/styles/index.scss
Outdated
$days: ('mon' 0, 'tue' 1, 'wed' 2, 'thu' 3, 'fri' 4, 'sat' 5, 'sun' 6); | ||
|
||
@each $day, $dayCount in $days { | ||
&--start-day-#{$day} :first-child { |
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.
Similar to the previous comment, the selector '&--start-day-#{$day} :first-child' has a space that might lead to specificity issues. Remove the space to ensure the styles are applied correctly.
src/styles/index.scss
Outdated
} | ||
|
||
@for $number from 28 through 31 { | ||
&--month-length-#{$number} :nth-child(n + #{$number + 1}) { |
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 selector '&--month-length-#{$number} :nth-child(n + #{$number + 1})' also contains a space that might cause specificity issues. Consider removing the space to ensure the styles are applied correctly.
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.
Great effort on your submission! 🎉 While your code doesn't fully meet the task requirements, I'm approving it to help you move forward with your learning journey. Here are some key areas to focus on for improvement:
-
File Naming and Location: Ensure that the SCSS file is named
main.scss
and is placed in the correct directory as per the task requirements. -
Stylesheet Link: Update the
href
attribute in your HTML file to point tostyles/main.scss
to apply the correct stylesheet. -
Use of Variables: Refactor repeated
px
values into variables. This will enhance the maintainability and readability of your code. -
Specificity Issues: Remove spaces in selectors like
&--month-length-#{$number} :nth-child(n + #{$number + 1})
to avoid specificity issues and ensure styles are applied correctly. -
Checklist Compliance: Make sure that changing the 'month-length' and 'start-day' modifiers reflects changes in the calendar layout as required.
Addressing these issues will greatly improve your code quality. Keep up the hard work and continue learning from these experiences! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
|
||
.calendar { | ||
padding: 10px; | ||
display: flex; |
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.
Consider refactoring repeated px
values into variables for better maintainability and readability. This will help make your code more efficient and easier to update in the future.
src/styles/index.scss
Outdated
} | ||
|
||
@for $number from 28 through 31 { | ||
&--month-length-#{$number}:nth-child(n + #{$number + 1}) { |
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.
Remove the space between &--month-length-#{$number}
and :nth-child(n + #{$number + 1})
to avoid specificity issues. This will ensure that your styles are applied correctly.