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