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