-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 #3926
base: master
Are you sure you want to change the base?
Develop #3926
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,9 @@ | ||
body { | ||
justify-content: center; | ||
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. Using |
||
align-items: center; | ||
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. Using |
||
height: 100dvh; | ||
font-family: Arial, sans-serif; | ||
font-size: 30px; | ||
display: flex; | ||
margin: 0; | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$widthDays: 100px; | ||
$heightDays: 100px; | ||
$gapDays: 1px; | ||
$calendar: 'mon' 0, | ||
'tue' 1, | ||
'wed' 2, | ||
'thu' 3, | ||
'fri' 4, | ||
'sat' 5, | ||
'sun' 6; | ||
$month-length: 31; | ||
$start-day: 'wed'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
@import './init/variables'; | ||
@import './blocks/page'; | ||
|
||
.calendar { | ||
flex-wrap: wrap; | ||
gap: 1px; | ||
padding: 10px; | ||
display: flex; | ||
width: ($widthDays + $gapDays) * 7; | ||
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. The calculation for the calendar width |
||
|
||
@for $i from 1 through $month-length { | ||
&--month-length-31 :nth-child(#{$i}), | ||
&--month-length-30 :nth-child(#{$i}), | ||
&--month-length-29 :nth-child(#{$i}), | ||
&--month-length-28 :nth-child(#{$i}) { | ||
width: $widthDays; | ||
height: $heightDays; | ||
box-sizing: border-box; | ||
border: 1px solid black; | ||
background-color: #eee; | ||
position: relative; | ||
transition-property: transform, background-color; | ||
transition-duration: 0.5s; | ||
cursor: pointer; | ||
} | ||
} | ||
|
||
&--month-length-30 :nth-child(n + 31), | ||
&--month-length-29 :nth-child(n + 30), | ||
&--month-length-28 :nth-child(n + 29) { | ||
visibility: hidden; | ||
} | ||
|
||
@for $i from 1 through $month-length { | ||
& :nth-child(#{$i}):before { | ||
content: '#{$i}'; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
} | ||
|
||
&__day:hover { | ||
background-color: #ffbfcb; | ||
transform: translate(0, -20px); | ||
} | ||
|
||
@each $day, $i in $calendar { | ||
&--start-day-#{$day} :first-child { | ||
margin-left: ($widthDays + $gapDays) * $i; | ||
} | ||
} | ||
} |
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
href
attribute is pointing to a SCSS file (styles/main.scss
). Browsers cannot directly interpret SCSS files. You need to compile the SCSS into a CSS file and link to that CSS file instead.