_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 - 7px; 302margin: 2px; 303padding: 7px 0 0; 304border-radius: $menuitem-size / 2; 305background-color: transparent; 306color: disabled($on-surface); 307font-weight: bold; 308font-size: 1em; 309text-align: center; 310} 311} 312 313@if $version >= 3.38 { 314/* Events */ 315.events-button { 316@extend %calendar-item; 317min-height: $menuitem-size - 4px * 2; 318padding: 4px 8px; 319 320.events-box { 321spacing: 8px; 322} 323 324.events-list { 325spacing: 8px; 326} 327 328.events-title { 329color: hint($on-surface); 330font-weight: bold; 331margin-bottom: 8px; 332} 333 334.event-time { 335color: hint($on-surface); 336font-size: 1em; 337font-feature-settings: "tnum"; 338} 339} 340} 341 342/* World clocks */ 343.world-clocks-button { 344@extend %calendar-item; 345min-height: $menuitem-size - 4px * 2; 346padding: 4px 8px; 347 348.world-clocks-grid { 349spacing-rows: .4em; 350spacing-columns: .8em; 351} 352 353// title 354.world-clocks-header { 355color: hint($on-surface); 356font-weight: bold; 357} 358 359// city label 360.world-clocks-city { 361color: inherit; 362font-weight: normal; 363font-size: 1em; 364} 365 366// timezone time 367.world-clocks-time { 368color: hint($on-surface); 369font-weight: normal; 370font-size: 1em; 371font-feature-settings: "tnum"; 372text-align: right; 373 374&:ltr { 375text-align: right; 376} 377 378&:rtl { 379text-align: left; 380} 381} 382 383// timezone offset label 384.world-clocks-timezone { 385color: disabled($on-surface); 386font-size: 1em; 387font-feature-settings: "tnum"; 388} 389} 390 391/* Weather */ 392.weather-button { 393@extend %calendar-item; 394min-height: $menuitem-size - 4px * 2; 395padding: 4px 8px; 396 397.weather-box { 398spacing: 0.4em; 399} 400 401.weather-header-box { 402spacing: 8px; 403} 404 405.weather-header { 406color: hint($on-surface); 407font-weight: bold; 408 409&.location { 410font-weight: normal; 411font-size: 1em; 412} 413} 414 415.weather-grid { 416spacing-rows: .4em; 417spacing-columns: .8em; 418} 419 420.weather-forecast-time { 421padding-top: 0; 422padding-bottom: 0; 423color: hint($on-surface); 424@include type(caption); 425font-feature-settings: "tnum"; 426} 427 428.weather-forecast-icon { 429icon-size: 32px; 430} 431 432.weather-forecast-temp { 433font-weight: bold; 434} 435} 436