Skip to content

Commit 8525dba

Browse files
committed
fix more
1 parent 02e4e1f commit 8525dba

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/pages/Calendar/Calendar.module.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
:root {
2+
--grid-column-start: 0;
3+
}
4+
15
.calendar {
26
}
37

@@ -17,9 +21,9 @@
1721
justify-content: center;
1822
}
1923

20-
@media only screen and (max-width: 824px) {
24+
@media only screen and (min-width: 824px) {
2125
.firstday {
22-
grid-column-start: none !important;
26+
grid-column-start: var(--grid-column-start);
2327
}
2428
}
2529

src/pages/Calendar/Calendar.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,15 @@ const Calendar: React.FC = () => {
8686
);
8787
}
8888

89+
const css = {
90+
"--grid-column-start": firstDayOfTheMonth,
91+
} as React.CSSProperties;
92+
8993
return (
9094
<div
9195
key={day + 1}
9296
className={dayClass}
93-
style={{
94-
gridColumnStart: day === 0 ? firstDayOfTheMonth : undefined,
95-
}}
97+
style={day === 0 ? css : undefined}
9698
>
9799
{winner && (
98100
<div className={styles.avatar}>

0 commit comments

Comments
 (0)