Debian Codegraph @

common/gtk-3.0/sass/_libhandy.scss

raw
1 /* Based on _Adwaita-base.scss from libhandy */
2
3 // HdyComboRow
4
5 popover.combo {
6 padding: 0;
7
8 list {
9 background-color: transparent;
10
11 > row {
12 padding: 0 10px;
13 min-height: 50px;
14
15 &:first-child { @extend %linked_vertical_top; }
16 &:last-child { @extend %linked_vertical_bottom; }
17 }
18 }
19
20 overshoot.top { @extend %linked_vertical_top; }
21 overshoot.bottom { @extend %linked_vertical_bottom; }
22
23 scrollbar.vertical {
24 background-color: $_popover_bg;
25
26 &:dir(ltr) { @extend %linked_right; }
27 &:dir(rtl) { @extend %linked_left; }
28 }
29 }
30
31 // HdyExpanderRow
32
33 row.expander {
34 padding: 0px;
35
36 &:checked image.expander-row-arrow:not(:disabled) {
37 color: $selected_bg_color;
38 }
39
40 image.expander-row-arrow:disabled {
41 color: $insensitive_fg_color;
42 }
43 }
44
45 // HdyKeypad
46
47 keypad {
48 .digit {
49 font-size: 200%;
50 font-weight: bold;
51 }
52
53 .letters {
54 font-size: 70%;
55 }
56
57 .symbol {
58 font-size: 160%;
59 }
60 }
61
62 // HdyViewSwitcher
63
64 viewswitcher {
65 &, & button {
66 margin: 0;
67 padding: 0;
68 }
69
70 button {
71 border-radius: 0;
72 border-top: 0;
73 border-bottom: 0;
74
75 &:not(:checked):not(:hover) {
76 background: transparent;
77 border-color: transparent;
78 }
79
80 &:checked, &:active {
81 border-color: $selected_bg_color;
82 }
83
84 // View switcher button
85 > stack > box {
86 &.narrow {
87 font-size: 0.75rem;
88 padding-top: 7px;
89 padding-bottom: 5px;
90
91 image,
92 label {
93 padding-left: 8px;
94 padding-right: 8px;
95 }
96 }
97
98 &.wide {
99 padding: 8px 10px;
100
101 label {
102 &:dir(ltr) {
103 padding-right: 7px;
104 }
105
106 &:dir(rtl) {
107 padding-left: 7px;
108 }
109 }
110 }
111 }
112
113 &.needs-attention {
114 > stack > box label {
115 background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to($selected_bg_color), to(transparent));
116 background-size: 6px 6px;
117 background-repeat: no-repeat;
118 background-position: right 0px;
119
120 &:dir(rtl) {
121 background-position: left 0px;
122 }
123 }
124
125 &:active > stack > box label {
126 background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to($selected_fg_color), to(transparent));
127 }
128 }
129 }
130 }
131
132 // HdyViewSwitcherBar
133
134 viewswitcherbar actionbar > revealer > box {
135 padding: 0;
136 }
137
138 // Content list
139
140 list.content {
141 &,
142 list {
143 background-color: transparent;
144 }
145
146 // Nested rows background
147 list.nested > row:not(:active) {
148 &:not(:hover):not(:selected),
149 &:hover:not(.activatable):not(:selected) {
150 background-color: mix($bg_color, $base_color);
151 }
152
153 &:hover.activatable:not(:selected) {
154 background-color: if($variant != 'dark', mix($base_color, black, 95%), mix($base_color, white, 97%));
155 }
156 }
157
158 > row {
159 // Regular rows and expander header rows background
160 &:not(.expander):not(:active):not(:hover):not(:selected),
161 &:not(.expander):hover:not(.activatable):not(:selected),
162 &.expander row.header:not(:active):not(:hover):not(:selected),
163 &.expander row.header:hover:not(.activatable):not(:selected) {
164 background-color: $base_color;
165 }
166
167 &:not(.expander):not(:active):hover.activatable:not(:selected),
168 &.expander row.header:not(:active):hover.activatable:not(:selected) {
169 background-color: if($variant != 'dark', mix($base_color, black, 95%), mix($base_color, white, 97%));
170 }
171
172 &,
173 list > row {
174 border-color: $borders_color;
175 border-style: solid;
176 transition: 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
177 }
178
179 // Top border
180 &:not(:last-child) {
181 border-width: 1px 1px 0px 1px;
182 }
183
184 // Rounded top
185 &:first-child,
186 &.expander:first-child row.header,
187 &.expander:checked,
188 &.expander:checked row.header,
189 &.expander:checked + row,
190 &.expander:checked + row.expander row.header {
191 @extend %linked_vertical_top;
192 }
193
194 // Bottom border
195 &:last-child,
196 &.checked-expander-row-previous-sibling,
197 &.expander:checked {
198 border-width: 1px;
199 }
200
201 // Rounded bottom
202 &:last-child,
203 &.checked-expander-row-previous-sibling,
204 &.expander:checked,
205 &.expander:not(:checked):last-child row.header,
206 &.expander:not(:checked).checked-expander-row-previous-sibling row.header,
207 &.expander.empty:checked row.header,
208 &.expander list.nested > row:last-child {
209 @extend %linked_vertical_bottom;
210 }
211
212 // Add space around expanded rows
213 &.expander:checked:not(:first-child),
214 &.expander:checked + row {
215 margin-top: 5px;
216 }
217 }
218 }
219
220 // Unified window
221
222 window.csd.unified:not(.solid-csd):not(.fullscreen):not(.tiled):not(.tiled-top):not(.tiled-bottom):not(.tiled-left):not(.tiled-right):not(.maximized) {
223 &,
224 > decoration,
225 > decoration-overlay {
226 border-radius: $_header_radius;
227 }
228 }
229
230 // HdyWindowHandle separator
231
232 .windowhandle separator.sidebar {
233 &:dir(ltr), &.left, &.left:dir(rtl),
234 &:dir(rtl), &.right {
235 background-color: $header_border;
236 margin: 0;
237 }
238 }
239
240 // Tabs
241
242 @mixin undershoot-gradient($dir) {
243 background: linear-gradient(to #{$dir},
244 $bg_color,
245 transparentize($bg_color, 1) 20px);
246 }
247
248 @mixin need-attention-gradient($dir) {
249 background: linear-gradient(to #{$dir},
250 transparentize($selected_bg_color, .3),
251 transparentize($selected_bg_color, .5) 1px,
252 transparentize($selected_bg_color, 1) 20px);
253 }
254
255 tabbar {
256 .box {
257 min-height: 20px;
258 background: $bg_color;
259 border-bottom: 1px solid $borders_color;
260 }
261
262 scrolledwindow.pinned {
263 undershoot {
264 border: 0 solid $borders_color;
265 }
266
267 &:dir(rtl) undershoot.left {
268 border-left-width: 1px;
269 }
270
271 &:dir(ltr) undershoot.right {
272 border-right-width: 1px;
273 }
274
275 tabbox {
276 &:dir(ltr) {
277 padding-right: 1px;
278 box-shadow: inset -1px 0 $borders_color;
279 }
280
281 &:dir(rtl) {
282 padding-left: 1px;
283 box-shadow: inset 1px 0 $borders_color;
284 }
285 }
286 }
287
288 undershoot {
289 transition: none;
290
291 &.left {
292 @include undershoot-gradient("right");
293 }
294
295 &.right {
296 @include undershoot-gradient("left");
297 }
298 }
299
300 .needs-attention-left undershoot.left {
301 @include need-attention-gradient("right");
302 }
303
304 .needs-attention-right undershoot.right {
305 @include need-attention-gradient("left");
306 }
307
308 tab {
309 min-width: 118px;
310 border-style: solid;
311 border-color: $borders_color;
312 border-width: 0 1px 0 1px;
313 transition: background 150ms ease-in-out;
314 background-color: transparentize($base_color, 1);
315 color: $insensitive_fg_color;
316
317 &.pinned {
318 min-width: 28px;
319 }
320
321 &:checked, &:checked:hover {
322 background-color: $base_color;
323 color: $fg_color;
324 }
325
326 &:hover {
327 background-color: transparentize($base_color, 0.5);
328 color: mix($fg_color, $insensitive_fg_color, 50%);
329 }
330 }
331
332 .start-action,
333 .end-action {
334 background-color: transparentize($base_color, 1);
335 border-color: $borders_color;
336 border-style: solid;
337 transition: background 150ms ease-in-out;
338
339 button {
340 border: none;
341 border-radius: 0;
342 }
343 }
344
345 .start-action:dir(ltr),
346 .end-action:dir(rtl) {
347 border-right-width: 1px;
348
349 > * {
350 margin-right: 1px;
351 }
352 }
353
354 .start-action:dir(rtl),
355 .end-action:dir(ltr) {
356 border-left-width: 1px;
357
358 > * {
359 margin-left: 1px;
360 }
361 }
362 }
363
364 .tab-drag-icon {
365 tab {
366 min-height: 20px;
367 background-color: $base_color;
368
369 $_wm_border: if($variant!='dark', transparentize(black, 0.9), transparentize(black, 0.45));
370
371 // copy shadow and border color from popovers
372 box-shadow: 0 2px 6px 1px if($variant!='dark', transparentize(black, 0.93), transparentize(black, 0.65)),
373 0 0 0 1px darken($borders_color, 5%);
374
375 margin: 25px;
376 }
377 }
378
379
380 tabbar,
381 .tab-drag-icon {
382 tab {
383 padding: 2px 6px;
384
385 &.needs-attention {
386 background-image:
387 radial-gradient(ellipse at bottom,
388 transparentize(white, .2),
389 transparentize($selected_bg_color, .8) 15%,
390 transparentize($selected_bg_color, 1) 15%);
391 }
392
393 .tab-close-button,
394 .tab-indicator {
395 padding: 0;
396 margin: 0;
397 min-width: 22px;
398 min-height: 22px;
399 color: mix($bg_color, $fg_color, 35%);
400
401 border: none;
402 box-shadow: none;
403 -gtk-icon-shadow: none;
404 text-shadow: none;
405 background: none;
406 }
407
408 .tab-close-button,
409 .tab-indicator.clickable {
410 &:hover {
411 color: lighten(red, 15%);
412 }
413
414 &:active {
415 color: $selected_bg_color;
416 }
417 }
418 }
419 }