summaryrefslogtreecommitdiff
path: root/desktop-themes/TraditionalOk/gtk-3.0/libhandy/_Adwaita-base.scss
blob: 4448d7909fae31166b8c1b8f132b7168816210f4 (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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
// Include base styling.
@import 'fallback-base';
@import 'shared-base';

// HdyComboRow

popover.combo {
  padding: 0px;

  list {
    border-style: none;
    background-color: transparent;

    > row {
      padding: 0px 12px 0px 12px;
      min-height: 50px;

      &:not(:last-child) {
        border-bottom: 1px solid hdyalpha($borders_color, 0.5)
      }

      &:first-child {
        @include rounded-border(top);
      }

      &:last-child {
        @include rounded-border(bottom);
      }
    }
  }

  @each $border in top, bottom {
    overshoot.#{$border} {
      @include rounded-border($border);
    }
  }

  scrollbar.vertical {
    padding-top: 2px;
    padding-bottom: 2px;

    &:dir(ltr) {
      @include rounded-border(right);
    }

    &:dir(rtl) {
      @include rounded-border(left);
    }
  }
}

// HdyExpanderRow

row.expander {
  padding: 0px;

  image.expander-row-arrow {
    @include margin-start(6px);
  }
}

// HdyKeypad

keypad {
  .digit {
    font-size: 200%;
    font-weight: bold;
  }

  .letters {
    font-size: 70%;
  }

  .symbol {
    font-size: 160%;
  }
}

// HdyViewSwitcher

viewswitcher {
  &, & button {
    margin: 0;
    padding: 0;
  }

  button {
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    box-shadow: none;
    font-size: 1rem;
    border-width: 0; // Yaru: remove headerbar buttons border

    &:not(:checked):not(:hover) {
      background: transparent;
    }

    &:not(:only-child):not(:last-child) {
      border-right-width: 0px;
    }

    &:not(only-child):first-child:not(:checked):not(:hover),
    &:not(:checked):not(:hover) + button:not(:checked):not(:hover) {
      border-left-color: transparent;
    }

    &:not(only-child):last-child:not(:checked):not(:hover) {
      border-right-color: transparent;
    }

    &:not(:checked):hover:not(:backdrop) {
      background-image: image(lighter($bg_color));
    }

    &:not(only-child):first-child:not(:checked):hover,
    &:not(:checked):hover + button:not(:checked):not(:hover),
    &:not(:checked):not(:hover) + button:not(:checked):hover {
      border-left-color: shade($borders_color, 1.15);
    }

    &:not(only-child):last-child:not(:checked):hover {
      border-right-color: shade($borders_color, 1.15);
    }

    &:not(:checked):hover:backdrop {
      background-image: image($bg_color);
    }

    // View switcher in a header bar
    headerbar &:not(:checked) {
      &:hover:not(:backdrop) {
        // Reimplementation of $button_fill from Adwaita. The colors are made
        // only 70% visible to avoid the highlight to be too strong.
        $c: hdyalpha($bg_color, 0.7);
        $button_fill: if($variant == 'light', linear-gradient(to top, shade($c, 0.96) 2px, $c),
                                              linear-gradient(to top, shade($c, 0.99) 2px, $c)) !global;
        background-image: $button_fill;
      }

      &:not(only-child):first-child:hover,
      &:hover + button:not(:checked):not(:hover),
      &:not(:hover) + button:not(:checked):hover {
        border-left-color: $borders_color;
      }

      &:not(only-child):last-child:hover {
        border-right-color: $borders_color;
      }

      &:hover:backdrop {
        background-image: image($bg_color);
      }
    }

    // View switcher button
    > stack > box {
      &.narrow {
        font-size: 0.75rem;
        padding-top: 7px;
        padding-bottom: 5px;

        image,
        label {
          padding-left: 8px;
          padding-right: 8px;
        }
      }

      &.wide {
        padding: 8px 12px;

        label {
          &:dir(ltr) {
            padding-right: 7px;
          }

          &:dir(rtl) {
            padding-left: 7px;
          }
        }
      }

      label.active {
        font-weight: bold;
      }
    }

    &.needs-attention {
      &:active > stack > box label,
      &:checked > stack > box label {
        animation: none;
        background-image: none;
      }

      > stack > box label {
        animation: needs_attention 150ms ease-in;
        background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to($primary_accent_bg_color), to(transparent)); // Yaru: use our own palette
        background-size: 6px 6px, 6px 6px;
        background-repeat: no-repeat;
        background-position: right 0px, right 1px;

        &:backdrop {
          background-size: 6px 6px, 0 0;
        }

        &:dir(rtl) {
          background-position: left 0px, left 1px;
        }
      }
    }
  }
}

// HdyViewSwitcherBar

viewswitcherbar actionbar > revealer > box {
  padding: 0;
}

// Content list

list.content {
  &,
  list {
    background-color: transparent;
  }

  // Nested rows background
  list.nested > row:not(:active) {
    &:not(:hover):not(:selected),
    &:hover:not(.activatable):not(:selected) {
      background-color: hdymix($bg_color, $base_color, 0.5);
    }

    &:hover.activatable:not(:selected) {
      background-color: hdymix($fg_color, $base_color, 0.95);
    }
  }

  > row {
    // Regular rows and expander header rows background
    &:not(.expander):not(:active):not(:hover):not(:selected),
    &:not(.expander):not(:active):hover:not(.activatable):not(:selected),
    &.expander row.header:not(:active):not(:hover):not(:selected),
    &.expander row.header:not(:active):hover:not(.activatable):not(:selected) {
      background-color: $base_color;
    }

    &:not(.expander):not(:active):hover.activatable:not(:selected),
    &.expander row.header:not(:active):hover.activatable:not(:selected) {
      background-color: hdymix($fg_color, $base_color, 0.95);
    }

    &,
    list > row {
      border-color: hdyalpha($borders_color, 0.7);
      border-style: solid;
      transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    // Top border
    &:not(:last-child) {
      border-width: 1px 1px 0px 1px;
    }

    // Rounded top
    &:first-child,
    &.expander:first-child row.header,
    &.expander:checked,
    &.expander:checked row.header,
    &.expander:checked + row,
    &.expander:checked + row.expander row.header {
      @include rounded-border(top);
    }

    // Bottom border
    &:last-child,
    &.checked-expander-row-previous-sibling,
    &.expander:checked {
      border-width: 1px;
    }

    // Rounded bottom
    &:last-child,
    &.checked-expander-row-previous-sibling,
    &.expander:checked,
    &.expander:not(:checked):last-child row.header,
    &.expander:not(:checked).checked-expander-row-previous-sibling row.header,
    &.expander.empty:checked row.header,
    &.expander list.nested > row:last-child {
      @include rounded-border(bottom);
    }

    // Add space around expanded rows
    &.expander:checked:not(:first-child),
    &.expander:checked + row {
      margin-top: 6px;
    }
  }
}

// List button

button.list-button:not(:active):not(:checked):not(:hover) {
  background: none;
  border: 1px solid hdyalpha($borders_color, 0.5);
  box-shadow: none;
}

// Unified window

window.csd.unified:not(.solid-csd):not(.fullscreen) {
  // Remove the sheen on headerbar...
  headerbar {
    // box-shadow: inset 0 1px rgba(255, 255, 255, if($variant == 'light', 0.7, 0)); Yaru: drop headerbar box-shadow overwrite

    &.selection-mode {
      box-shadow: none;
    }
  }

  // ...and add it on the window itself
  > decoration-overlay {
    // Use a white sheen instead of @borders, as it has to be neutral enough
    // for any content and not just headerbar background
    // box-shadow: inset 0 1px rgba(255, 255, 255, if($variant == 'light', 0.34, 0.065)); Yaru: drop headerbar box-shadow overwrite
  }

  &:not(.tiled):not(.tiled-top):not(.tiled-bottom):not(.tiled-left):not(.tiled-right):not(.maximized) {
    &,
    > decoration,
    > decoration-overlay {
      border-radius: 8px;
    }
  }
}