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