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

Develop #3877

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

Develop #3877

wants to merge 2 commits into from

Conversation

VitaliiShc
Copy link

  • DEMO LINK

  • TEST REPORT LINK

  • Changing 'month-lengh' and 'start-day' modifier in the code element
    reflects in changing calendar layout

  • Each day has no modifiers, only class (eg. calendar__day)

  • All Typical Mistakes from BEM lesson theory are checked.

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

Great job on your work! 🎉 While there are a few minor code style improvements suggested, they don't impact the core functionality of your project. Keep up the good work and consider the feedback for future enhancements.

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

@@ -9,10 +9,45 @@
<title>Calendar</title>
<link
rel="stylesheet"
href="styles/index.scss"
href="styles/index.css"

Choose a reason for hiding this comment

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

The link to the stylesheet should use a relative path starting with './' to indicate that the file is in a subdirectory relative to the current file. Change href="styles/index.css" to href="./styles/index.css".

Comment on lines +19 to +50
<ul class="calendar calendar--start-day-sun calendar--month-length-31">
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>
<li class="calendar__day"></li>

Choose a reason for hiding this comment

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

Consider using a loop or a more dynamic way to generate the list items if possible. This will make the code more maintainable and reduce repetition.

}

@for $value from 28 through 31 {
&--month-length-#{$value} :nth-child(-n + #{$value}) {

Choose a reason for hiding this comment

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

There is an extra space before ':nth-child(-n + #{$value})'. According to the Code Style Rules ❗️, there should not be a space between the class name and the pseudo-class.

Comment on lines +37 to +42
.calendar__day {
width: 100px;
height: 100px;
border: 1px solid #000;
background: #eee;
display: none;

Choose a reason for hiding this comment

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

The '.calendar__day' class has 'display: none;' which means that the days will not be visible by default. Ensure this is intentional, as it might hide the calendar days unless overridden by other styles.

Comment on lines +272 to +286
.calendar--month-length-28 :nth-child(-n + 28) {
display: flex;
}

.calendar--month-length-29 :nth-child(-n + 29) {
display: flex;
}

.calendar--month-length-30 :nth-child(-n + 30) {
display: flex;
}

.calendar--month-length-31 :nth-child(-n + 31) {
display: flex;
}

Choose a reason for hiding this comment

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

The selectors for '.calendar--month-length-*' classes use ':nth-child(-n + *)' to display certain days. Ensure that these classes are applied correctly in the HTML to reflect the correct number of days for each month.

Comment on lines +288 to +310
.calendar--start-day-tue .calendar__day:first-child {
margin-left: 101px;
}

.calendar--start-day-wed .calendar__day:first-child {
margin-left: 202px;
}

.calendar--start-day-thu .calendar__day:first-child {
margin-left: 303px;
}

.calendar--start-day-fri .calendar__day:first-child {
margin-left: 404px;
}

.calendar--start-day-sat .calendar__day:first-child {
margin-left: 505px;
}

.calendar--start-day-sun .calendar__day:first-child {
margin-left: 606px;
}

Choose a reason for hiding this comment

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

The '.calendar--start-day-*' classes adjust the margin-left for the first calendar day. Verify that these classes are applied correctly to align the first day of the month according to the starting day of the week.

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