-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
add task solution #3982
base: master
Are you sure you want to change the base?
add task solution #3982
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,62 @@ | ||
.calendar { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: $gap; | ||
width: calc(7 * $cell-size + 6 * $gap); | ||
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. Ensure that the variable |
||
padding: $calendar-padding; | ||
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. Ensure that the variable |
||
|
||
&__day { | ||
position: relative; | ||
width: $cell-size; | ||
height: $cell-size; | ||
background-color: #eee; | ||
border: $cell-border solid black; | ||
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. Ensure that the variable |
||
text-align: center; | ||
box-sizing: border-box; | ||
|
||
&:hover { | ||
cursor: pointer; | ||
background-color: #ffbfcb; | ||
transform: translateY(-20px); | ||
transition: | ||
transform 0.5s, | ||
background-color 0.5s; | ||
} | ||
|
||
&::before { | ||
content: counter(day); | ||
counter-increment: day; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
font-family: Arial, sans-serif; | ||
font-size: $font-size; | ||
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. Ensure that the variable |
||
} | ||
} | ||
|
||
counter-reset: day; | ||
|
||
@for $i from 28 through 31 { | ||
&--month-length-#{$i} .calendar__day:nth-child(n + #{$i + 1}) { | ||
display: none; | ||
} | ||
} | ||
|
||
@each $day, | ||
$margin | ||
in ( | ||
mon: 0, | ||
tue: calc($cell-size + $gap), | ||
wed: calc(2 * ($cell-size + $gap)), | ||
thu: calc(3 * ($cell-size + $gap)), | ||
fri: calc(4 * ($cell-size + $gap)), | ||
sat: calc(5 * ($cell-size + $gap)), | ||
sun: calc(6 * ($cell-size + $gap)) | ||
) | ||
{ | ||
&--start-day-#{$day} .calendar__day:first-child { | ||
margin-left: $margin; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
body { | ||
margin: 0; | ||
height: 100vh; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} /*# sourceMappingURL=page.css.map */ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
body { | ||
margin: 0; | ||
height: 100vh; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
body { | ||
margin: 0; | ||
} | ||
@import './utils/variables'; | ||
@import './blocks/page'; | ||
@import './blocks/calendar'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$cell-size: 100px; | ||
$cell-border: 1px; | ||
$gap: 1px; | ||
$font-size: 30px; | ||
$calendar-padding: 10px; |
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.
Ensure that the variable
$gap
is defined in your SCSS files. If it's missing, it will cause a compilation error.