summaryrefslogtreecommitdiffstats
path: root/data/theme/gnome-shell-sass/widgets/_calendar.scss
blob: fa7080b44ccbb23cceac17c585a6b11c3e0ca233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
/* Date/Time Menu */

// overall menu
#calendarArea {
  padding: $base_padding - 2px;
}

// Calendar menu side column
.datemenu-calendar-column {
  spacing: $base_padding;
  &:ltr {padding-left: $base_padding;}
  &:rtl {padding-right: $base_padding;}
  .datemenu-displays-box {spacing: $base_padding;}
}

/* today button (the date) */
.datemenu-today-button {
  @include card(flat);
  padding: $base_padding * 1.5;

  // weekday label
  .day-label {
    @extend %heading;
  }

  // date label
  .date-label {
    @extend %title_2;
  }
}

/* Calendar */
.calendar {
  @include card(flat);
  margin-top: 0;

  // month header
  .calendar-month-header {

    // prev/next month icons
    .calendar-change-month-back StIcon,
    .calendar-change-month-forward StIcon {
      icon-size: $base_icon_size;
    }

    // month label
    .calendar-month-label {
      color: lighten($fg_color,5%);
      @extend %heading;
      padding: 8px 0;
    }
    .pager-button {
      background-color: transparent;
      height: 32px;
      width: 32px;
      margin: 2px;
      border-radius: $base_border_radius - 2px;
      &:hover, &:focus {background-color: $hover_bg_color;}
      &:active {background-color: $active_bg_color;}
    }
  }

  $calendar_day_size: 3em;

  .calendar-day-base {
    text-align: center;
    margin: 2px;
    padding: 0 !important;
    height: $calendar_day_size !important;
    width: $calendar_day_size !important;
    border-radius: 99px;
    transition-duration: 100ms;
    @extend %numeric;
    @extend %smaller;
    
    &:hover {background-color: $hover_bg_color;}
    &:focus {
      background-color: mix($bg_color, $selected_bg_color, 80%);
      color: $selected_fg_color;
      box-shadow:inset 0 0 0 2px transparentize($selected_bg_color, 0.4);
    }

    &:active,&:selected {
      color: $active_fg_color;
      background-color: $active_bg_color;
      &:focus {
        background-color: mix($active_bg_color, $selected_bg_color, 80%);
      }
    }

    // day of week heading
    &.calendar-day-heading {
      color: $insensitive_fg_color;
      padding-top: $base_padding;
      height: 16px !important; // force heading to be smaller height
      font-weight: bold;
      @extend %smaller;
    }
  }

  .calendar-day {}
  .calendar-work-day {}
  .calendar-nonwork-day {color: $insensitive_fg_color;}
  .calendar-other-month-day {
    color: transparentize($fg_color, 0.5);
    &.calendar-nonwork-day {
      color: transparentize($insensitive_fg_color, 0.5);
    }
  }

  // Today
  .calendar-today {
    background-color: $selected_bg_color;
    font-weight: 800;
    color: $selected_fg_color !important;

    &:hover,&:focus {
      background-color:lighten($selected_bg_color, 3%);
      color: inherit;
    }

    &:active,&:selected {
      background-color: $selected_bg_color;
      color: inherit;

      &:hover,&:focus {
        background-color:lighten($selected_bg_color, 3%);
        color: inherit;
      }
    }
  }

  .calendar-day-with-events {
    background-image: if($variant == 'light', url("resource:///org/gnome/shell/theme/calendar-today-light.svg"),url("resource:///org/gnome/shell/theme/calendar-today.svg"));
    background-size: contain;
  }

  .calendar-week-number {
    @include fontsize($base_font_size - 4);
    font-weight: bold;
    font-feature-settings: "tnum";
    margin: 6px;
    padding: 0 $base_padding;
    border-radius: 3px;
    background-color: darken($bg_color, 2%);
    color: $insensitive_fg_color
  }
}

/* Events */
.events-button {
  @include card;
  padding: $base_padding * 2;

  .events-box {
    spacing: $base_padding;
  }

  .events-list {
    spacing: 2 * $base_padding;
  }

  .events-title {
    @extend %heading;
    color: $insensitive_fg_color;
    margin-bottom: $base_margin;
  }

  .event-time {
    @extend %numeric;
    @extend %caption;
    color: $insensitive_fg_color;
  }
}

/* World clocks */
.world-clocks-button {
  @include card;
  padding: $base_padding * 2;

  .world-clocks-grid {
    spacing-rows: $base_padding;
    spacing-columns: $base_padding * 2;
  }

  // title
  .world-clocks-header {
    @extend %heading;
    color: $insensitive_fg_color;
  }

  // city label
  .world-clocks-city {
    color: $fg_color;
  }

  // timezone time
  .world-clocks-time {
    @extend %heading;
    @extend %numeric;
    color: $fg_color;

    &:ltr {text-align: right;}
    &:rtl {text-align: left;}
  }

  // timezone offset label
  .world-clocks-timezone {
    @extend %numeric;
    @extend %caption;
    color: $insensitive_fg_color;
  }
}

/* Weather */
.weather-button {
  @include card;
  padding: $base_padding * 2;

  .weather-box {
    spacing: $base_padding + $base_margin;
  }

  .weather-header-box {
    spacing: $base_padding;
  }

  .weather-header {
    color: $insensitive_fg_color;
    @extend %heading;

    &.location {
      font-weight: normal;
    }
  }

  .weather-grid {
    spacing-rows: $base_padding;
    spacing-columns: $base_padding * 2;
  }

  .weather-forecast-time {
    @extend %numeric;
    @extend %caption;
    color: darken($fg_color,30%);
    padding-top: 0.2em;
    padding-bottom: 0.4em;
  }

  .weather-forecast-icon {
    icon-size: $large_icon_size;
  }

  .weather-forecast-temp {
    @extend %heading;
  }
}