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