-
Notifications
You must be signed in to change notification settings - Fork 4.8k
solution #5211
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
base: master
Are you sure you want to change the base?
solution #5211
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| .calendar { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| width: $calendar-width; | ||
| gap: $gap; | ||
| padding: $padding; | ||
|
Comment on lines
+4
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This breaks the requirement: "Limit calendar width to exactly 7 columns + |
||
|
|
||
| &__day { | ||
| display: flex; | ||
| box-sizing: border-box; | ||
| width: $cell-size; | ||
| height: $cell-size; | ||
| background-color: $cell-background-color; | ||
| border: $border-settings; | ||
| align-items: center; | ||
| justify-content: center; | ||
| position: relative; | ||
| font-family: $font-family; | ||
| font-size: $font-size; | ||
| font-weight: 400; | ||
| transition: 0.5s; | ||
|
|
||
| &::before { | ||
| font-size: $font-size; | ||
| font-weight: 400; | ||
| } | ||
|
|
||
| &:hover { | ||
| background-color: $hover-cell-background-color; | ||
| transform: translateY(-20px); | ||
| font-weight: 400; | ||
| cursor: pointer; | ||
| } | ||
|
|
||
| @for $i from 1 through 31 { | ||
| &:nth-child(#{$i})::before { | ||
| content: '#{$i}'; | ||
| font-size: $font-size; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @for $i from 28 through 31 { | ||
| &--month-length-#{$i} { | ||
| .calendar__day:nth-child(n + #{$i + 1}) { | ||
| display: none; | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @each $day, $i in $days { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This violates the checklist requirement: "- [ ] Changing 'month-lengh' and 'start-day' modifier in the code element reflects in changing calendar layout" — the start-day mapping is wrong. The $days map uses |
||
| .calendar--start-day-#{$day} .calendar__day:first-child { | ||
| margin-left: $i * ($cell-size + $gap); | ||
| } | ||
| } | ||
|
Comment on lines
+52
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This risks violating the checklist item: "Changing 'month-lengh' and 'start-day' modifier in the code element reflects in changing calendar layout". The |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| $count-day: 7; | ||
| $padding: 10px; | ||
| $gap: 1px; | ||
| $cell-size: 100px; | ||
| $calendar-width: $cell-size * $count-day + $gap * ($count-day - 1); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This violates the requirement: "Limit calendar width to exactly 7 columns + |
||
| $cell-background-color: #eee; | ||
| $font-family: Arial, sans-serif; | ||
| $font-size: 30px; | ||
| $hover-cell-background-color: #ffbfcb; | ||
| $border-settings: 1px solid #000; | ||
| $days: ( | ||
| 'mon': 0, | ||
| 'tue': 1, | ||
| 'wed': 2, | ||
| 'thu': 3, | ||
| 'fri': 4, | ||
| 'sat': 5, | ||
| 'sun': 6, | ||
|
Comment on lines
+11
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This mapping will break the
Comment on lines
+11
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This violates checklist item #1: "Changing 'month-lengh' and 'start-day' modifier in the code element reflects in changing calendar layout". The |
||
| ); | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| @import './blocks/variables'; | ||
| @import './blocks/calendar'; | ||
|
|
||
| body { | ||
| margin: 0; | ||
| padding: 0; | ||
| height: 100vh; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| font-family: $font-family; | ||
| } |
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.
This violates the requirement from the task description: "Write styles in
src/styles/main.scssinstead ofsrc/style.css." The HTML currently links tostyles/index.scss(line 12). Please rename/move your stylesheet tosrc/styles/main.scss(or createmain.scssand import the content) and update the<link>insrc/index.htmltohref="styles/main.scss"so the project matches the exact task requirement.