layout_caledar#5449
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because the SCSS currently fails to compile due to a missing src/styles/_variables.scss import, which is a critical blocker: without it, styles don’t build and the calendar cannot render correctly. You need to create _variables.scss in src/styles/ (or fix the import path in src/styles/main.scss line 1) and define the sizing/color variables used in your calendar so the build succeeds. After that, ensure _calendar.scss implements all required behavior: numbers added in .calendar__day::before via a Sass @for loop (Arial, 30px, centered), flex layout with 1px gaps, and container width calculated for 7 columns of 100px squares plus 10px padding using those variables. Also implement the calendar--start-day-* modifiers via @each so only the first .calendar__day gets the appropriate margin-left, and the calendar--month-length-* modifiers via @for that hide days beyond the specified length using nth-child selectors. Finally, make sure hover on .calendar__day sets cursor: pointer, background #FFBFCB, transform to move the cell up by 20px, and a smooth transition of 0.5s. Your HTML and main SCSS setup look good, so once these missing SCSS pieces are implemented and the build passes, your solution should fully meet the task requirements.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved because it correctly implements all the required calendar behavior and styling, and no critical blocking issues remain. The calendar is centered on the page, uses flex with a 1px gap, and has 31 .calendar__day elements with numbers generated via SCSS ::before and an @for loop, satisfying the requirement to keep HTML days empty and meet the visual specs. The calendar--start-day-* modifiers are generated via @each over the days map and only shift the first day with margin-left, so changing the start-day modifier in HTML correctly moves the month’s starting column, fulfilling [CHECKLIST ITEM #1]. Likewise, the calendar--month-length-* modifiers (28–31) hide extra days via nth-child based on the selected month length, and the default calendar--month-length-31 and calendar--start-day-sun in HTML match the task’s defaults. Hover behavior on .calendar__day (pointer cursor, pink #FFBFCB background, 20px upward transform, 0.5s transition) fully matches the specification. BEM is followed properly with calendar as the block, calendar__day as the element, and modifiers applied only to the block, satisfying [CHECKLIST ITEM #2]. Overall, you’ve met the functional, SCSS, and BEM requirements; nice work bringing everything into alignment with the task description.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
reflects in changing calendar layout
Typical MistakesfromBEMlesson theory are checked.