_calendar.scss
assembler source, ASCII text
1
/* Date/Time Menu */
2
3
$calendar-column-spacing: 8px;
4
$calendar-column-margin: 0 8px;
5
6
%calendar-item {
7
margin: 0;
8
border: 0;
9
border-radius: $corner-radius;
10
11
&,
12
&:focus,
13
&:hover,
14
&:active {
15
border-color: transparent;
16
box-shadow: none;
17
background-color: transparent;
18
color: inherit;
19
text-shadow: none;
20
icon-shadow: none;
21
transition-duration: $duration;
22
}
23
24
&:focus {
25
background-color: overlay("focus", $on-surface);
26
}
27
28
&:hover {
29
background-color: overlay("hover", $on-surface);
30
}
31
32
&:active {
33
background-color: overlay("pressed", $on-surface);
34
transition-duration: $duration-ripple;
35
}
36
}
37
38
.clock-display-box {
39
spacing: 0;
40
41
.clock {
42
padding-left: $panel-button-hpadding;
43
padding-right: $panel-button-hpadding;
44
}
45
}
46
47
// overall menu
48
#calendarArea {
49
padding: 8px 16px;
50
}
51
52
// Calendar menu side column
53
.datemenu-calendar-column {
54
spacing: $calendar-column-spacing;
55
padding: 0;
56
border: 0 solid divider($on-surface);
57
58
&:ltr {
59
margin-right: 0;
60
border-left-width: 0;
61
}
62
63
&:rtl {
64
margin-left: 0;
65
border-right-width: 0;
66
}
67
68
.datemenu-displays-section {
69
padding-bottom: 0;
70
}
71
72
.datemenu-displays-box {
73
spacing: $calendar-column-spacing;
74
margin: $calendar-column-margin;
75
}
76
}
77
78
.events-section-title {
79
@extend %calendar-item;
80
min-height: $menuitem-size - 4px * 2;
81
padding: 4px 8px;
82
color: hint($on-surface) !important;
83
font-weight: bold;
84
}
85
86
/* today button (the date) */
87
.datemenu-today-button {
88
@extend %calendar-item;
89
margin: $calendar-column-margin;
90
min-height: $menuitem-size * 2 - 4px * 2;
91
padding: 4px 8px;
92
93
// weekday label
94
.day-label {
95
font-weight: normal;
96
font-size: 1em;
97
}
98
99
// date label
100
.date-label {
101
@include type(headline5);
102
}
103
}
104
105
/* Calendar */
106
.calendar {
107
@extend %calendar-item;
108
margin: $calendar-column-margin;
109
margin-bottom: 0;
110
padding: 0;
111
112
// month
113
.calendar-month-label {
114
transition-duration: $duration;
115
height: $menuitem-size - 6px * 2;
116
margin: 2px;
117
padding: 6px 8px;
118
border-radius: $corner-radius;
119
color: inherit;
120
font-weight: bold;
121
text-align: center;
122
123
&:focus {
124
background-color: overlay("focus", $on-surface);
125
}
126
}
127
128
// prev/next month icons
129
@if $version >= 3.32 {
130
.calendar-change-month-back StIcon,
131
.calendar-change-month-forward StIcon {
132
icon-size: 16px;
133
}
134
} @else {
135
.calendar-change-month-back {
136
background-image: url("assets/calendar-arrow-left.svg");
137
138
&:rtl {
139
background-image: url("assets/calendar-arrow-right.svg");
140
}
141
}
142
143
.calendar-change-month-forward {
144
background-image: url("assets/calendar-arrow-right.svg");
145
146
&:rtl {
147
background-image: url("assets/calendar-arrow-left.svg");
148
}
149
}
150
}
151
152
.pager-button {
153
transition-duration: $duration;
154
width: $menuitem-size;
155
height: $menuitem-size;
156
margin: 2px;
157
border-radius: $menuitem-size / 2;
158
background-color: transparent;
159
color: hint($on-surface);
160
161
&:focus {
162
background-color: overlay("focus", $on-surface);
163
}
164
165
&:hover {
166
background-color: overlay("hover", $on-surface);
167
}
168
169
&:active {
170
background-color: overlay("pressed", $on-surface);
171
transition-duration: $duration-ripple;
172
}
173
}
174
175
.calendar-day-base {
176
transition-duration: $duration;
177
width: $menuitem-size;
178
height: $menuitem-size;
179
margin: 2px;
180
padding: 0;
181
border: 0;
182
border-radius: $menuitem-size / 2;
183
@include type(caption);
184
font-feature-settings: "tnum";
185
text-align: center;
186
187
&:focus {
188
background-color: overlay("focus", $on-surface);
189
}
190
191
&:hover {
192
background-color: overlay("hover", $on-surface);
193
}
194
195
&:active {
196
transition-duration: $duration-ripple;
197
border-color: transparent;
198
background-color: overlay("pressed", $on-surface);
199
color: inherit;
200
}
201
202
&:selected {
203
border-color: transparent;
204
background-color: $overlay-selected;
205
color: inherit;
206
}
207
208
// day of week heading
209
&.calendar-day-heading {
210
width: $menuitem-size;
211
height: $menuitem-size - 7px;
212
margin-top: 2px;
213
padding: 7px 0 0;
214
border-radius: $menuitem-size / 2;
215
background-color: transparent;
216
color: disabled($on-surface);
217
@include type(caption);
218
font-weight: bold;
219
text-align: center;
220
221
&:focus {
222
background-color: overlay("focus", $on-surface);
223
}
224
}
225
}
226
227
//border collapse hack - see calendar.js
228
.calendar-day {
229
border-width: 0;
230
}
231
232
.calendar-day-top {
233
border-top-width: 0;
234
}
235
236
.calendar-day-left {
237
border-left-width: 0;
238
}
239
240
.calendar-work-day {
241
}
242
243
.calendar-nonwork-day {
244
color: inherit;
245
}
246
247
// Today
248
.calendar-today {
249
border: 0;
250
background-color: transparent;
251
color: inherit;
252
font-weight: bold !important;
253
254
&:focus {
255
background-color: overlay("focus", $on-surface);
256
color: inherit;
257
}
258
259
&:hover {
260
background-color: overlay("hover", $on-surface);
261
color: inherit;
262
}
263
264
&:active {
265
&,
266
&:hover,
267
&:focus {
268
background-color: overlay("pressed", $on-surface);
269
color: inherit;
270
}
271
}
272
273
&:selected {
274
&,
275
&:hover,
276
&:focus {
277
background-color: $overlay-selected;
278
color: inherit;
279
}
280
}
281
}
282
283
.calendar-day-with-events {
284
background-image: none;
285
color: $primary !important;
286
font-weight: normal;
287
text-decoration: underline;
288
289
&.calendar-work-day {
290
color: $primary !important;
291
font-weight: normal;
292
}
293
}
294
295
.calendar-other-month-day {
296
color: disabled-hint($on-surface) !important;
297
}
298
299
.calendar-week-number {
300
width: $menuitem-size;
301
height: $menuitem-size;
302
margin: 2px;
303
border-radius: $menuitem-size / 2;
304
background-color: transparent;
305
color: disabled($on-surface);
306
font-weight: bold;
307
font-size: 1em;
308
text-align: center;
309
310
@if $version <= 3.36 {
311
height: $menuitem-size - 7px;
312
padding: 7px 0 0;
313
}
314
}
315
}
316
317
@if $version >= 3.38 {
318
/* Events */
319
.events-button {
320
@extend %calendar-item;
321
min-height: $menuitem-size - 4px * 2;
322
padding: 4px 8px;
323
324
.events-box {
325
spacing: 8px;
326
}
327
328
.events-list {
329
spacing: 8px;
330
}
331
332
.events-title {
333
color: hint($on-surface);
334
font-weight: bold;
335
margin-bottom: 8px;
336
}
337
338
.event-time {
339
color: hint($on-surface);
340
font-size: 1em;
341
font-feature-settings: "tnum";
342
}
343
}
344
}
345
346
/* World clocks */
347
.world-clocks-button {
348
@extend %calendar-item;
349
min-height: $menuitem-size - 4px * 2;
350
padding: 4px 8px;
351
352
.world-clocks-grid {
353
spacing-rows: .4em;
354
spacing-columns: .8em;
355
}
356
357
// title
358
.world-clocks-header {
359
color: hint($on-surface);
360
font-weight: bold;
361
}
362
363
// city label
364
.world-clocks-city {
365
color: inherit;
366
font-weight: normal;
367
font-size: 1em;
368
}
369
370
// timezone time
371
.world-clocks-time {
372
color: hint($on-surface);
373
font-weight: normal;
374
font-size: 1em;
375
font-feature-settings: "tnum";
376
text-align: right;
377
378
&:ltr {
379
text-align: right;
380
}
381
382
&:rtl {
383
text-align: left;
384
}
385
}
386
387
// timezone offset label
388
.world-clocks-timezone {
389
color: disabled($on-surface);
390
font-size: 1em;
391
font-feature-settings: "tnum";
392
}
393
}
394
395
/* Weather */
396
.weather-button {
397
@extend %calendar-item;
398
min-height: $menuitem-size - 4px * 2;
399
padding: 4px 8px;
400
401
.weather-box {
402
spacing: 0.4em;
403
}
404
405
.weather-header-box {
406
spacing: 8px;
407
}
408
409
.weather-header {
410
color: hint($on-surface);
411
font-weight: bold;
412
413
&.location {
414
font-weight: normal;
415
font-size: 1em;
416
}
417
}
418
419
.weather-grid {
420
spacing-rows: .4em;
421
spacing-columns: .8em;
422
}
423
424
.weather-forecast-time {
425
padding-top: 0;
426
padding-bottom: 0;
427
color: hint($on-surface);
428
@include type(caption);
429
font-feature-settings: "tnum";
430
}
431
432
.weather-forecast-icon {
433
icon-size: 32px;
434
}
435
436
.weather-forecast-temp {
437
font-weight: bold;
438
}
439
}
440