_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 - 4px * 2; 81padding: 4px 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 - 4px * 2; 91padding: 4px 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; 115height: $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: $overlay-selected; 205color: inherit; 206} 207 208// day of week heading 209&.calendar-day-heading { 210width: $menuitem-size; 211height: $menuitem-size - 7px; 212margin-top: 2px; 213padding: 7px 0 0; 214border-radius: $menuitem-size / 2; 215background-color: transparent; 216color: disabled($on-surface); 217@include type(caption); 218font-weight: bold; 219text-align: center; 220 221&:focus { 222background-color: overlay("focus", $on-surface); 223} 224} 225} 226 227//border collapse hack - see calendar.js 228.calendar-day { 229border-width: 0; 230} 231 232.calendar-day-top { 233border-top-width: 0; 234} 235 236.calendar-day-left { 237border-left-width: 0; 238} 239 240.calendar-work-day { 241} 242 243.calendar-nonwork-day { 244color: inherit; 245} 246 247// Today 248.calendar-today { 249border: 0; 250background-color: transparent; 251color: inherit; 252font-weight: bold !important; 253 254&:focus { 255background-color: overlay("focus", $on-surface); 256color: inherit; 257} 258 259&:hover { 260background-color: overlay("hover", $on-surface); 261color: inherit; 262} 263 264&:active { 265&, 266&:hover, 267&:focus { 268background-color: overlay("pressed", $on-surface); 269color: inherit; 270} 271} 272 273&:selected { 274&, 275&:hover, 276&:focus { 277background-color: $overlay-selected; 278color: inherit; 279} 280} 281} 282 283.calendar-day-with-events { 284background-image: none; 285color: $primary !important; 286font-weight: normal; 287text-decoration: underline; 288 289&.calendar-work-day { 290color: $primary !important; 291font-weight: normal; 292} 293} 294 295.calendar-other-month-day { 296color: disabled-hint($on-surface) !important; 297} 298 299.calendar-week-number { 300width: $menuitem-size; 301height: $menuitem-size; 302margin: 2px; 303border-radius: $menuitem-size / 2; 304background-color: transparent; 305color: disabled($on-surface); 306font-weight: bold; 307font-size: 1em; 308text-align: center; 309 310@if $version <= 3.36 { 311height: $menuitem-size - 7px; 312padding: 7px 0 0; 313} 314} 315} 316 317@if $version >= 3.38 { 318/* Events */ 319.events-button { 320@extend %calendar-item; 321min-height: $menuitem-size - 4px * 2; 322padding: 4px 8px; 323 324.events-box { 325spacing: 8px; 326} 327 328.events-list { 329spacing: 8px; 330} 331 332.events-title { 333color: hint($on-surface); 334font-weight: bold; 335margin-bottom: 0; 336} 337 338.event-time { 339color: hint($on-surface); 340@include type(caption); 341font-feature-settings: "tnum"; 342} 343} 344} 345 346/* World clocks */ 347.world-clocks-button { 348@extend %calendar-item; 349min-height: $menuitem-size - 4px * 2; 350padding: 4px 8px; 351 352.world-clocks-grid { 353spacing-rows: .4em; 354spacing-columns: .8em; 355} 356 357// title 358.world-clocks-header { 359color: hint($on-surface); 360font-weight: bold; 361} 362 363// city label 364.world-clocks-city { 365color: inherit; 366font-weight: normal; 367font-size: 1em; 368} 369 370// timezone time 371.world-clocks-time { 372color: hint($on-surface); 373font-weight: normal; 374font-size: 1em; 375font-feature-settings: "tnum"; 376text-align: right; 377 378&:ltr { 379text-align: right; 380} 381 382&:rtl { 383text-align: left; 384} 385} 386 387// timezone offset label 388.world-clocks-timezone { 389color: disabled($on-surface); 390font-size: 1em; 391font-feature-settings: "tnum"; 392} 393} 394 395/* Weather */ 396.weather-button { 397@extend %calendar-item; 398min-height: $menuitem-size - 4px * 2; 399padding: 4px 8px; 400 401.weather-box { 402spacing: 0.4em; 403} 404 405.weather-header-box { 406spacing: 8px; 407} 408 409.weather-header { 410color: hint($on-surface); 411font-weight: bold; 412 413&.location { 414font-weight: normal; 415font-size: 1em; 416} 417} 418 419.weather-grid { 420spacing-rows: .4em; 421spacing-columns: .8em; 422} 423 424.weather-forecast-time { 425padding-top: 0; 426padding-bottom: 0; 427color: hint($on-surface); 428@include type(caption); 429font-feature-settings: "tnum"; 430} 431 432.weather-forecast-icon { 433icon-size: 32px; 434} 435 436.weather-forecast-temp { 437font-weight: bold; 438} 439} 440