1
+ : root {
2
+ --dark-text : # f8fbff ;
3
+ --light-body : # f3f8fe ;
4
+ --light-main : # fdfdfd ;
5
+ --light-second : # c3c2c8 ;
6
+ --light-hover : # f0f0f0 ;
7
+ --light-text : # 151426 ;
8
+ --light-btn : # 9796f0 ;
9
+ --blue : # 0000ff ;
10
+ --white : # fff ;
11
+ --shadow : rgba (100 , 100 , 111 , 0.2 ) 0px 7px 29px 0px ;
12
+ --font-family : consolas;
13
+ }
14
+ * {
15
+ padding : 0 ;
16
+ margin : 0 ;
17
+ box-sizing : border-box;
18
+ }
19
+ html ,
20
+ body {
21
+ place-items : center;
22
+ font-family : var (--font-family );
23
+ background : linear-gradient (to right, # 9796f0, # fbc7d4 );
24
+ overflow : hidden;
25
+ }
26
+ .contianer {
27
+ width : max-content;
28
+ height : max-content;
29
+ position : relative;
30
+ display : flex;
31
+ padding : 2% 0px 0px 0px ;
32
+ justify-content : center;
33
+ top : 10% ;
34
+ right : 0% ;
35
+ width : 100% ;
36
+ height : 100% ;
37
+ }
38
+ .calendar {
39
+ height : 610px ;
40
+ width : max-content;
41
+ background-color : white;
42
+ border-radius : 25px ;
43
+ overflow : hidden;
44
+ padding : 30px 50px 0px 50px ;
45
+ }
46
+ .calendar {
47
+ box-shadow : var (--shadow );
48
+ }
49
+ .calendar-header {
50
+ background : # 9796f0 ;
51
+ display : flex;
52
+ justify-content : space-between;
53
+ align-items : center;
54
+ font-weight : 700 ;
55
+ color : var (--white );
56
+ padding : 10px ;
57
+ }
58
+ .calendar-body {
59
+ pad : 10px ;
60
+ }
61
+ .calendar-week-days {
62
+ display : grid;
63
+ grid-template-columns : repeat (7 , 1fr );
64
+ font-weight : 600 ;
65
+ cursor : pointer;
66
+ color : rgb (104 , 104 , 104 );
67
+ }
68
+ .calendar-week-days div : hover {
69
+ color : black;
70
+ transform : scale (1.2 );
71
+ transition : all .2s ease-in-out;
72
+ }
73
+ .calendar-week-days div {
74
+ display : grid;
75
+ place-items : center;
76
+ color : var (--bg-second );
77
+ height : 50px ;
78
+ }
79
+ .calendar-days {
80
+ display : grid;
81
+ grid-template-columns : repeat (7 , 1fr );
82
+ gap : 2px ;
83
+ color : var (--color-txt );
84
+ }
85
+ .calendar-days div {
86
+ width : 37px ;
87
+ height : 33px ;
88
+ display : flex;
89
+ align-items : center;
90
+ justify-content : center;
91
+ padding : 5px ;
92
+ position : relative;
93
+ cursor : pointer;
94
+ animation : to-top 1s forwards;
95
+ }
96
+ .month-picker {
97
+ padding : 5px 10px ;
98
+ border-radius : 10px ;
99
+ cursor : pointer;
100
+ }
101
+ .month-picker : hover {
102
+ background-color : var (--color-hover );
103
+ }
104
+ .month-picker : hover {
105
+ color : var (--color-txt );
106
+ }
107
+ .year-picker {
108
+ display : flex;
109
+ align-items : center;
110
+ }
111
+ .year-change {
112
+ height : 30px ;
113
+ width : 30px ;
114
+ border-radius : 50% ;
115
+ display : grid;
116
+ place-items : center;
117
+ margin : 0px 10px ;
118
+ cursor : pointer;
119
+ }
120
+ .year-change : hover {
121
+ background-color : var (--light-btn );
122
+ transition : all .2s ease-in-out ;
123
+ transform : scale (1.12 );
124
+ }
125
+ .year-change : hover pre {
126
+ color : var (--bg-body );
127
+ }
128
+ .calendar-footer {
129
+ padding : 10px ;
130
+ display : flex;
131
+ justify-content : flex-end;
132
+ align-items : center;
133
+ }
134
+ # year : hover {
135
+ cursor : pointer;
136
+ transform : scale (1.2 );
137
+ transition : all 0.2 ease-in-out;
138
+ }
139
+ .calendar-days div span {
140
+ position : absolute;
141
+ }
142
+ .calendar-days div : hover {
143
+ transition : width 0.2s ease-in-out, height 0.2s ease-in-out;
144
+ background-color : # fbc7d4 ;
145
+ border-radius : 20% ;
146
+ color : var (--dark-text );
147
+ }
148
+ .calendar-days div .current-date {
149
+ color : var (--dark-text );
150
+ background-color : var (--light-btn );
151
+ border-radius : 20% ;
152
+ }
153
+ .month-list {
154
+ position : relative;
155
+ left : 0 ;
156
+ top : -50px ;
157
+ background-color : # ebebeb ;
158
+ color : var (--light-text );
159
+ display : grid;
160
+ grid-template-columns : repeat (3 , auto);
161
+ gap : 5px ;
162
+ border-radius : 20px ;
163
+ }
164
+ .month-list > div {
165
+ display : grid;
166
+ place-content : center;
167
+ margin : 5px 10px ;
168
+ transition : all 0.2s ease-in-out;
169
+ }
170
+ .month-list > div > div {
171
+ border-radius : 15px ;
172
+ padding : 10px ;
173
+ cursor : pointer;
174
+ }
175
+ .month-list > div > div : hover {
176
+ background-color : var (--light-btn );
177
+ color : var (--dark-text );
178
+ transform : scale (0.9 );
179
+ transition : all 0.2s ease-in-out;
180
+ }
181
+ .month-list .show {
182
+ visibility : visible;
183
+ pointer-events : visible;
184
+ transition : 0.6s ease-in-out;
185
+ animation : to-left .71s forwards;
186
+ }
187
+ .month-list .hideonce {
188
+ visibility : hidden;
189
+ }
190
+ .month-list .hide {
191
+ animation : to-right 1s forwards;
192
+ visibility : none;
193
+ pointer-events : none;
194
+ }
195
+ .date-time-formate {
196
+ width : max-content;
197
+ height : max-content;
198
+ font-family : Dubai Light, Century Gothic;
199
+ position : relative;
200
+ display : inline;
201
+ top : 140px ;
202
+ justify-content : center;
203
+ }
204
+ .day-text-formate {
205
+ font-family : Microsoft JhengHei UI;
206
+ font-size : 1.4rem ;
207
+ padding-right : 5% ;
208
+ border-right : 3px solid # 9796f0 ;
209
+ position : absolute;
210
+ left : -1rem ;
211
+ }
212
+ .date-time-value {
213
+ display : block;
214
+ height : max-content;
215
+ width : max-content;
216
+ position : relative;
217
+ left : 40% ;
218
+ top : -18px ;
219
+ text-align : center;
220
+ }
221
+ .time-formate {
222
+ font-size : 1.5rem ;
223
+ }
224
+ .time-formate .hideTime {
225
+ animation : hidetime 1.5s forwards;
226
+ }
227
+ .day-text-formate .hidetime {
228
+ animation : hidetime 1.5s forwards;
229
+ }
230
+ .date-formate .hideTime {
231
+ animation : hidetime 1.5s forwards;
232
+ }
233
+ .day-text-formate .showtime {
234
+ animation : showtime 1s forwards;
235
+ }
236
+ .time-formate .showtime {
237
+ animation : showtime 1s forwards;
238
+ }
239
+ .date-formate .showtime {
240
+ animation : showtime 1s forwards;
241
+ }
242
+ @keyframes to-top {
243
+ 0% {
244
+ transform : translateY (0 );
245
+ opacity : 0 ;
246
+ }
247
+ 100% {
248
+ transform : translateY (100% );
249
+ opacity : 1 ;
250
+ }
251
+ }
252
+ @keyframes to-left {
253
+ 0% {
254
+ transform : translatex (230% );
255
+ opacity : 1 ;
256
+ }
257
+ 100% {
258
+ transform : translatex (0 );
259
+ opacity : 1 ;
260
+ }
261
+ }
262
+ @keyframes to-right {
263
+ 10% {
264
+ transform : translatex (0 );
265
+ opacity : 1 ;
266
+ }
267
+ 100% {
268
+ transform : translatex (-150% );
269
+ opacity : 1 ;
270
+ }
271
+ }
272
+ @keyframes showtime {
273
+ 0% {
274
+ transform : translatex (250% );
275
+ opacity : 1 ;
276
+ }
277
+ 100% {
278
+ transform : translatex (0% );
279
+ opacity : 1 ;
280
+ }
281
+ }
282
+ @keyframes hidetime {
283
+ 0% {
284
+ transform : translatex (0% );
285
+ opacity : 1 ;
286
+ }
287
+ 100% {
288
+ transform : translatex (-370% );
289
+ opacity : 1 ;
290
+ }
291
+ }
292
+ @media (max-width : 375px ) {
293
+ .month-list > div {
294
+
295
+ margin : 5px 0px ;
296
+ }
297
+ }
0 commit comments