-
Notifications
You must be signed in to change notification settings - Fork 5k
Layout-calendar #5465
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?
Layout-calendar #5465
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,55 @@ | ||
| .calendar { | ||
| width: 7 * $widthDay + 6 * $gapDay + 2 * $paddingCalendar; | ||
| padding: $paddingCalendar; | ||
| display: flex; | ||
| flex-flow: row wrap; | ||
| gap: $gapDay; | ||
|
|
||
| &__day { | ||
| position: relative; | ||
| width: $widthDay; | ||
| height: $heightDay; | ||
| border: 1px solid black; | ||
| box-sizing: border-box; | ||
| background-color: #eee; | ||
| cursor: pointer; | ||
| transition: all 0.5s ease; | ||
|
|
||
| &::before { | ||
| position: absolute; | ||
| inset: 0; | ||
| font-size: 30px; | ||
|
|
||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| &:hover { | ||
| background-color: #ffbfcb; | ||
| transform: translate(0, -20px); | ||
| } | ||
|
|
||
| @for $monthDay from 1 through 31 { | ||
| &:nth-child(#{$monthDay}) { | ||
| &::before { | ||
| content: '#{$monthDay}'; | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @for $monthLength from 28 through 31 { | ||
| &--month-length-#{$monthLength} { | ||
| .calendar__day:nth-child(n + #{$monthLength + 1}) { | ||
| display: none; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @each $day, $marginLeft in $daysWeek { | ||
| &--start-day-#{$day} &__day:first-child { | ||
| margin-left: $marginLeft; | ||
| } | ||
| } | ||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| @import './variables'; | ||
| @import './calendar'; | ||
|
|
||
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body { | ||
| min-height: 100vh; | ||
| font-family: Arial, Helvetica, sans-serif; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| $widthDay: 100px; | ||
| $heightDay: $widthDay; | ||
| $paddingCalendar: 10px; | ||
| $gapDay: 1px; | ||
|
Comment on lines
+2
to
+4
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: "Use flex with |
||
| $gap-day-width: $widthDay + $gapDay; | ||
| $daysWeek: ( | ||
| 'mon': 0, | ||
| 'tue': $gap-day-width, | ||
| 'wed': $gap-day-width * 2, | ||
| 'thu': $gap-day-width * 3, | ||
| 'fri': $gap-day-width * 4, | ||
| 'sat': $gap-day-width * 5, | ||
| 'sun': $gap-day-width * 6, | ||
| ); | ||
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 description requires: "Write styles in
src/styles/main.scssinstead ofsrc/style.css". Currently you usestyles/index.scssas the main stylesheet and link to it here. This violates that requirement; consider renaming your entry SCSS file tomain.scssand updating thishrefaccordingly.