A fork of the Materia GTK theme.

Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

 _common.scss

View raw Download
text/plain • 61.97 kiB
Unicode text, UTF-8 text
        
            
1
$asset_suffix: if($variant=='dark', '-dark', '');
2
3
$small_size: 24px;
4
$medium_size: 36px;
5
$large_size: 48px;
6
7
$container_padding: 6px;
8
$material_radius: 2px;
9
10
$material_duration: 0.2s;
11
$material_timing_function: cubic-bezier(0.4, 0, 0.2, 1);
12
13
* {
14
padding: 0;
15
background-clip: padding-box;
16
// transition: all $material_duration $material_timing_function;
17
transition: all $material_duration $material_timing_function, color 0; //FIXME:
18
-GtkToolButton-icon-spacing: 4;
19
-GtkTextView-error-underline-color: $error_color;
20
21
-GtkCheckButton-indicator-size: 20;
22
-GtkCheckMenuItem-indicator-size: 16;
23
24
// The size for scrollbars. The slider is 2px smaller, but we keep it
25
// up so that the whole area is sensitive to button presses for the
26
// slider. The stepper button is larger in both directions, the slider
27
// only in the width
28
29
-GtkScrolledWindow-scrollbar-spacing: 0;
30
-GtkScrolledWindow-scrollbars-within-bevel: 1;
31
32
-GtkToolItemGroup-expander-size: 11;
33
-GtkExpander-expander-size: 16;
34
-GtkTreeView-expander-size: 11;
35
36
-GtkTreeView-horizontal-separator: 4;
37
38
-GtkMenu-horizontal-padding: 0;
39
-GtkMenu-vertical-padding: 0;
40
41
-GtkWidget-link-color: $link_color;
42
-GtkWidget-visited-link-color: $link_visited_color;
43
44
-GtkWidget-focus-padding: 2; // FIXME: do we still need these?
45
-GtkWidget-focus-line-width: 1; //
46
47
-GtkWidget-text-handle-width: 20;
48
-GtkWidget-text-handle-height: 20;
49
50
-GtkDialog-button-spacing: 4;
51
-GtkDialog-action-area-border: 0;
52
53
-GtkStatusbar-shadow-type: none;
54
55
// We use the outline properties to signal the focus properties
56
// to the adwaita engine: using real CSS properties is faster,
57
// and we don't use any outlines for now.
58
59
outline-style: solid;
60
outline-width: 2px;
61
outline-color: $track_color;
62
outline-offset: -4px;
63
outline-radius: 2px;
64
}
65
66
67
/***************
68
* Base States *
69
***************/
70
71
.background {
72
background-color: $bg_color;
73
color: $fg_color;
74
75
&:backdrop {
76
// color: $backdrop_fg_color;
77
}
78
}
79
80
/*
81
These wildcard seems unavoidable, need to investigate.
82
Wildcards are bad and troublesome, use them with care,
83
or better, just don't.
84
Everytime a wildcard is used a kitten dies, painfully.
85
*/
86
87
*:insensitive {
88
-gtk-image-effect: dim;
89
}
90
91
.gtkstyle-fallback {
92
background-color: $bg_color;
93
color: $fg_color;
94
&:prelight {
95
background-color: darken($bg_color, 5%);
96
color: $fg_color;
97
}
98
&:active {
99
background-color: darken($bg_color, 10%);
100
color: $fg_color;
101
}
102
&:insensitive {
103
background-color: $bg_color;
104
color: $insensitive_fg_color;
105
}
106
&:selected {
107
background-color: $selected_bg_color;
108
color: $selected_fg_color;
109
}
110
}
111
112
.view {
113
@extend .list-row.activatable;
114
background-color: $base_color;
115
color: $fg_color;
116
117
&:hover, &:active, &:selected { border-radius: 2px; }
118
119
&:insensitive {
120
// background-color: $secondary_base_color;
121
color: $insensitive_fg_color;
122
}
123
124
&:backdrop {
125
// color: $backdrop_fg_color;
126
}
127
128
&:selected { @extend %selected_items; }
129
}
130
131
.rubberband {
132
border: 1px solid $secondary_selected_bg_color;
133
background-color: scale-alpha($secondary_selected_bg_color, $lower_opacity);
134
}
135
136
.label {
137
&.separator {
138
color: $fg_color;
139
@extend .dim-label;
140
// &:backdrop { color: $backdrop_fg_color; }
141
}
142
&:selected {
143
@extend %selected_items;
144
}
145
&:insensitive {
146
color: $insensitive_fg_color;
147
// &:backdrop { color: $backdrop_insensitive_fg_color; }
148
}
149
}
150
151
.dim-label {
152
opacity: $hint_opacity;
153
}
154
155
GtkAssistant {
156
.sidebar {
157
padding: 6px 0;
158
border-top: 1px solid $borders_color;
159
&:dir(ltr) { border-right: 1px solid $borders_color; }
160
&:dir(rtl) { border-left: 1px solid $borders_color; }
161
}
162
&.csd .sidebar { border-top-style: none; }
163
.sidebar .label {
164
opacity: $hint_opacity;
165
padding: 5px 12px 6px;
166
font-weight: bold;
167
}
168
.sidebar .label.highlight {
169
opacity: 1;
170
}
171
}
172
173
GtkTextView { // This will get overridden by .view, needed by gedit line numbers
174
background-color: $secondary_base_color;
175
}
176
177
.grid-child {
178
// outline-offset: -2px;
179
padding: 4px;
180
border-radius: 2px;
181
&:selected { @extend %selected_items; }
182
}
183
184
%osd, .osd { opacity: $higher_opacity; }
185
186
/*********************
187
* Spinner Animation *
188
*********************/
189
190
@keyframes spin {
191
to { -gtk-icon-transform: rotate(1turn); }
192
}
193
194
.spinner {
195
background-color: blue;
196
background-image: none;
197
opacity: 0; // non spinning spinner makes no sense
198
-gtk-icon-source: -gtk-icontheme('process-working-symbolic');
199
&:active {
200
opacity: 1;
201
animation: spin 1s linear infinite;
202
&:insensitive {
203
opacity: $disabled_opacity;
204
}
205
}
206
}
207
208
/****************
209
* Text Entries *
210
****************/
211
212
.entry {
213
padding: 7px 8px 8px;
214
border-radius: 2px;
215
@include entry(normal);
216
&:focus { @include entry(focus); }
217
&:insensitive { @include entry(insensitive); }
218
&.flat {
219
border-radius: 0;
220
@include entry(flat);
221
&:focus { @include entry(flat-focus); }
222
&:insensitive { @include entry(flat-insensitive); }
223
}
224
225
&:selected { @extend %selected_items; }
226
227
&.image { // icons inside the entry
228
&.left { padding-left: 2px; }
229
&.right { padding-right: 2px; }
230
}
231
232
&.progressbar {
233
margin: 2px;
234
border-style: none none solid;
235
border-width: 2px;
236
border-color: $selected_bg_color;
237
border-radius: 0;
238
box-shadow: none;
239
background-color: transparent;
240
background-image: none;
241
}
242
243
.linked > &:not(.flat) { @extend %linked; }
244
245
.linked.vertical > &:not(.flat) { @extend %linked_vertical; }
246
247
// entry error and warning style
248
@each $e_type, $e_color in (error, $error_color),
249
(warning, $warning_color) {
250
&.#{$e_type} {
251
@include entry(normal, $e_color);
252
&:focus { @include entry(focus, $e_color); }
253
&:insensitive { @include entry(insensitive, $e_color); }
254
&.flat {
255
@include entry(flat, $e_color);
256
&:focus { @include entry(flat-focus, $e_color); }
257
&:insensitive { @include entry(flat-insensitive, $e_color); }
258
}
259
}
260
}
261
262
&.image { // entry icons colors
263
&:not(:hover):not(:active) { color: gtkalpha(currentColor, $enabled_opacity); }
264
&:insensitive { color: gtkalpha(currentColor, $hint_opacity); }
265
}
266
267
.osd & {
268
}
269
}
270
271
272
/***********
273
* Buttons *
274
***********/
275
276
// stuff for .needs-attention
277
@keyframes needs_attention {
278
from {
279
background-image: -gtk-gradient(radial,
280
center center, 0,
281
center center, 0.001,
282
to($accent_bg_color),
283
to(transparent));
284
}
285
to {
286
background-image: -gtk-gradient(radial,
287
center center, 0,
288
center center, 0.5,
289
to($accent_bg_color),
290
to(transparent));
291
}
292
}
293
294
295
.button {
296
padding: 7px 10px 8px;
297
border-radius: 2px;
298
background-repeat: no-repeat;
299
background-position: center, center;
300
background-size: ($medium_size * 2 / 0.8) ($medium_size * 2 / 0.8), auto;
301
font-weight: 500;
302
@include button(normal);
303
&:hover { @include button(hover); }
304
&:active { @include button(active); }
305
&:insensitive { @include button(insensitive); }
306
&:checked { @include button(checked); }
307
&:checked:insensitive { @include button(checked-insensitive); }
308
&.flat {
309
@include button(flat);
310
&:hover { @include button(flat-hover); }
311
&:active { @include button(flat-active); }
312
&:insensitive { @include button(flat-insensitive); }
313
&:checked { @include button(flat-checked); }
314
&:checked:insensitive { @include button(flat-checked-insensitive); }
315
.linked > & {
316
border-radius: 2px;
317
&.image-button {
318
outline-radius: 100px;
319
border-radius: 100px;
320
}
321
}
322
}
323
// big standalone buttons like in Documents pager
324
&.osd {
325
&.image-button {
326
padding: 16px;
327
background-size: ($large_size / 0.8) ($large_size / 0.8), auto;
328
}
329
&:insensitive { opacity: 0; }
330
}
331
//overlay / OSD style
332
.osd & {
333
}
334
335
// Suggested and Destructive Action buttons
336
@each $b_type, $b_color in (suggested-action, $suggested_color),
337
(destructive-action, $destructive_color) {
338
&.#{$b_type} {
339
background-color: $b_color;
340
color: $selected_fg_color;
341
// @include button(normal, $b_color, white);
342
// &:hover { @include button(hover, $b_color, white); }
343
// &:active, &:checked { @include button(active, $b_color, white); }
344
&:insensitive { @include button(insensitive, $b_color, white); }
345
&:checked { background-color: mix($selected_fg_color, $b_color, percentage($lower_opacity)); }
346
&.flat {
347
background-color: transparent;
348
color: $b_color;
349
// @include button(flat, $b_color, white);
350
// &:hover { @include button(flat-hover, $b_color, white); }
351
// &:active, &:checked { @include button(flat-active, $b_color, white); }
352
&:insensitive { @include button(flat-insensitive, $b_color, white); }
353
}
354
}
355
}
356
357
&.image-button { @extend %image_button; }
358
359
&.text-button {
360
padding-left: 16px;
361
padding-right: 16px;
362
}
363
364
&.text-button.image-button {
365
// those buttons needs uneven horizontal padding, we want the icon side
366
// to have the image-button padding, while the text side the text-button
367
// one, so we're adding the missing padding to the label depending on
368
// its position inside the button
369
padding: 7px 10px 8px; // same as .button
370
outline-radius: 2px;
371
border-radius: 2px;
372
background-size: ($medium_size * 2 / 0.8) ($medium_size * 2 / 0.8), auto;
373
.label:first-child { padding-left: 6px; }
374
.label:last-child { padding-right: 6px; }
375
}
376
377
.stack-switcher > & {
378
// to position the needs attention dot, padding is added to the button
379
// child, a label needs just lateral padding while an icon needs vertical
380
// padding added too.
381
382
outline-offset: -4px; // needs to be set or it gets overriden by GtkRadioButton outline-offset
383
384
> .label {
385
padding-left: 6px; // label padding
386
padding-right: 6px; //
387
}
388
> GtkImage {
389
padding-left: 6px; // image padding
390
padding-right: 6px; //
391
padding-top: 3px; //
392
padding-bottom: 3px; //
393
}
394
&.text-button {
395
padding: 7px 10px 8px; // needed or it will get overridden
396
}
397
&.image-button {
398
// we want image buttons to have a 1:1 aspect ratio, so compensation
399
// of the padding added to the GtkImage is needed
400
padding: 7px 4px;
401
}
402
&.needs-attention > .label,
403
&.needs-attention > GtkImage { @extend %needs_attention; }
404
&.needs-attention:checked > .label,
405
&.needs-attention:checked > GtkImage {
406
animation: none;
407
background-image: none;
408
}
409
}
410
411
//inline-toolbar buttons
412
.inline-toolbar & {
413
@extend .button.flat;
414
@extend %image_button;
415
}
416
417
.primary-toolbar & { icon-shadow: none; } // tango icons don't need shadows
418
419
.linked > &:not(.flat):not(:only-child) { @extend %linked; }
420
421
.linked.vertical > &:not(.flat):not(:only-child) { @extend %linked_vertical; }
422
}
423
424
%image_button {
425
padding: 10px;
426
outline-radius: 100px;
427
border-radius: 100px;
428
background-size: ($medium_size / 0.8) ($medium_size / 0.8), auto;
429
}
430
431
%needs_attention {
432
transition: none;
433
animation: needs_attention $material_duration $material_timing_function forwards;
434
background-repeat: no-repeat;
435
background-position: right 3px;
436
background-size: 6px 6px;
437
&:dir(rtl) { background-position: left 3px; }
438
}
439
440
441
// all the following is for the +|- buttons on inline toolbars, that way
442
// should really be deprecated...
443
.inline-toolbar GtkToolButton > .button { // redefining the button look is
444
// needed since those are flat...
445
}
446
447
// More inline toolbar buttons
448
.inline-toolbar.toolbar GtkToolButton {
449
// & > .button.flat { @extend %linked_middle; }
450
// &:first-child > .button.flat { @extend %linked:first-child; }
451
// &:last-child > .button.flat { @extend %linked:last-child; }
452
// &:only-child > .button.flat { @extend %linked:only-child; }
453
}
454
455
%linked_middle {
456
border-radius: 0;
457
}
458
459
%linked {
460
outline-radius: 2px;
461
@extend %linked_middle;
462
&:first-child {
463
border-top-left-radius: 2px;
464
border-bottom-left-radius: 2px;
465
}
466
&:last-child {
467
border-top-right-radius: 2px;
468
border-bottom-right-radius: 2px;
469
}
470
&:only-child {
471
border-radius: 2px;
472
}
473
}
474
475
%linked_vertical_middle {
476
border-radius: 0;
477
}
478
479
%linked_vertical{
480
outline-radius: 2px;
481
@extend %linked_vertical_middle;
482
&:first-child {
483
border-top-left-radius: 2px;
484
border-top-right-radius: 2px;
485
}
486
&:last-child {
487
border-bottom-left-radius: 2px;
488
border-bottom-right-radius: 2px;
489
}
490
&:only-child {
491
border-radius: 2px;
492
}
493
}
494
495
/* menu buttons */
496
.menuitem.button.flat {
497
&:selected { @extend %selected_items; }
498
}
499
500
501
GtkColorButton.button {
502
padding: 7px 8px 8px; // Uniform padding on the GtkColorButton
503
504
GtkColorSwatch:first-child:last-child { // :first-child:last-child for a specificity bump, it gets overridden by the
505
// colorpicker style, otherwise
506
border-radius: 2px;
507
box-shadow: $z-depth-1;
508
}
509
}
510
511
/*********
512
* Links *
513
*********/
514
515
*:link {
516
color: $link_color;
517
&:hover, &:active { color: $link_color; }
518
&:visited {
519
color: $link_visited_color;
520
&:hover, &:active { color: $link_visited_color; }
521
*:selected & { color: mix($selected_fg_color, $selected_bg_color, 60%); }
522
}
523
&:selected, *:selected & {
524
color: mix($selected_fg_color, $selected_bg_color, 80%);
525
}
526
}
527
528
.button:link, .button:visited {
529
@extend *:link;
530
& > .label {
531
text-decoration-line: underline;
532
}
533
}
534
535
/*****************
536
* GtkSpinButton *
537
*****************/
538
539
.spinbutton {
540
.button {
541
padding: 4px;
542
border: solid $container_padding transparent;
543
@extend %image_button;
544
// @extend .button.flat;
545
@include button(flat);
546
&:hover { @include button(flat-hover); }
547
&:active { @include button(flat-active); }
548
&:insensitive { @include button(flat-insensitive); }
549
}
550
.osd & {
551
.button {
552
}
553
}
554
&.vertical { //FIXME: try using linking templates for vertically linked stuff
555
.button {
556
padding-top: 10px; // Same vertical padding as image-buttons
557
padding-bottom: 10px; //
558
border: none;
559
&:first-child {
560
border-radius: 2px 2px 0 0;
561
}
562
&:last-child {
563
border-radius: 0 0 2px 2px;
564
}
565
}
566
&.entry {
567
}
568
}
569
GtkTreeView & {
570
&.entry, &.entry:focus {
571
// padding: 1px;
572
// border-width: 1px 0;
573
// border-color: $selected_bg_color;
574
// border-radius: 0;
575
// box-shadow: none;
576
}
577
}
578
}
579
580
/**************
581
* ComboBoxes *
582
**************/
583
GtkComboBox {
584
> .the-button-in-the-combobox { padding: 5px 6px 6px; } // Otherwise combos
585
// are bigger then
586
// buttons
587
-GtkComboBox-arrow-scaling: 0.5;
588
-GtkComboBox-shadow-type: none;
589
590
.menu .menuitem { padding: 5px 6px 6px; }
591
.separator.vertical {
592
// always disable separators
593
-GtkWidget-wide-separators: true;
594
}
595
&.combobox-entry .entry {
596
&:dir(ltr) {
597
border-top-right-radius: 0;
598
border-bottom-right-radius: 0;
599
}
600
&:dir(rtl) {
601
border-top-left-radius: 0;
602
border-bottom-left-radius: 0;
603
}
604
}
605
&.combobox-entry .button {
606
padding: 10px;
607
&:dir(ltr) {
608
border-top-left-radius: 0;
609
border-bottom-left-radius: 0;
610
}
611
&:dir(rtl) {
612
border-top-right-radius: 0;
613
border-bottom-right-radius: 0;
614
}
615
}
616
}
617
618
.linked > GtkComboBox > .the-button-in-the-combobox,
619
.linked > GtkComboBoxText > .the-button-in-the-combobox {
620
// the combo is a composite widget so the way we do button linkind doesn't
621
// work, special case needed. See
622
// https://bugzilla.gnome.org/show_bug.cgi?id=733979
623
&:dir(ltr),
624
&:dir(rtl) { @extend %linked_middle; } // specificity bump
625
}
626
.linked > GtkComboBox:first-child > .the-button-in-the-combobox,
627
.linked > GtkComboBoxText:first-child > .the-button-in-the-combobox {
628
@extend %linked:first-child;
629
}
630
.linked > GtkComboBox:last-child > .the-button-in-the-combobox,
631
.linked > GtkComboBoxText:last-child > .the-button-in-the-combobox {
632
@extend %linked:last-child;
633
}
634
.linked > GtkComboBox:only-child > .the-button-in-the-combobox,
635
.linked > GtkComboBoxText:only-child > .the-button-in-the-combobox {
636
@extend %linked:only-child;
637
}
638
639
.linked.vertical > GtkComboBoxText > .the-button-in-the-combobox,
640
.linked.vertical > GtkComboBox > .the-button-in-the-combobox { @extend %linked_vertical_middle; }
641
.linked.vertical > GtkComboBoxText:first-child > .the-button-in-the-combobox,
642
.linked.vertical > GtkComboBox:first-child > .the-button-in-the-combobox { @extend %linked_vertical:first-child; }
643
.linked.vertical > GtkComboBoxText:last-child > .the-button-in-the-combobox,
644
.linked.vertical > GtkComboBox:last-child > .the-button-in-the-combobox { @extend %linked_vertical:last-child; }
645
.linked.vertical > GtkComboBoxText:only-child > .the-button-in-the-combobox,
646
.linked.vertical > GtkComboBox:only-child > .the-button-in-the-combobox { @extend %linked_vertical:only-child; }
647
648
/************
649
* Toolbars *
650
************/
651
.toolbar {
652
-GtkWidget-window-dragging: true;
653
padding: 4px;
654
background-color: $bg_color;
655
.osd &, &.osd {
656
padding: $container_padding;
657
border-style: solid;
658
border-width: 8px;
659
border-image: -gtk-scaled(url("assets/osd-shadow#{$asset_suffix}.png"),
660
url("assets/osd-shadow#{$asset_suffix}@2.png"))
661
10 / 10px stretch;
662
border-radius: 2px;
663
// box-shadow: $z-depth-2;
664
background-color: $base_color;
665
&:backdrop {
666
border-image: -gtk-scaled(url("assets/osd-shadow-backdrop#{$asset_suffix}.png"),
667
url("assets/osd-shadow-backdrop#{$asset_suffix}@2.png"))
668
10 / 10px stretch;
669
// box-shadow: $z-depth-1;
670
}
671
& .button {
672
@extend .button.flat;
673
}
674
}
675
}
676
677
//searchbar, location-bar & inline-toolbar
678
.inline-toolbar {
679
padding: $container_padding;
680
border-style: solid;
681
border-width: 0 1px 1px;
682
border-color: $borders_color;
683
background-color: $secondary_base_color;
684
}
685
686
.search-bar, .location-bar {
687
padding: $container_padding;
688
border-style: solid;
689
border-width: 0 0 1px;
690
border-color: $borders_color;
691
background-color: $dark_color;
692
}
693
694
/***************
695
* Header bars *
696
***************/
697
698
.titlebar,
699
.header-bar {
700
padding: $container_padding;
701
border-width: 0 0 1px;
702
border-style: solid;
703
border-color: $borders_color;
704
border-radius: 2px 2px 0 0;
705
box-shadow: inset 0 1px $highlight_color;
706
background-color: $dark_color;
707
background-clip: border-box;
708
709
&:backdrop {
710
// background-color: $dark_color;
711
}
712
713
.title {
714
padding-left: 12px;
715
padding-right: 12px;
716
font-weight: bold;
717
}
718
719
.subtitle {
720
@extend .dim-label;
721
padding-left: 12px;
722
padding-right: 12px;
723
font-size: smaller;
724
}
725
726
.header-bar-separator,
727
& > GtkBox > .separator.vertical {
728
-GtkWidget-wide-separators: true;
729
-GtkWidget-separator-width: 1px;
730
border-style: solid;
731
border-width: 0 1px;
732
border-color: $borders_color;
733
}
734
735
& .button:not(.suggested-action):not(.destructive-action) {
736
@extend .button.flat;
737
border-image: -gtk-gradient(radial,
738
center bottom, 0,
739
center bottom, 0.001,
740
to($selected_bg_color),
741
to(transparent))
742
0 0 0 / 0 0 0px;
743
&:checked {
744
border-image: -gtk-gradient(radial,
745
center bottom, 0,
746
center bottom, 0.5,
747
to($selected_bg_color),
748
to(transparent))
749
0 0 2 / 0 0 2px;
750
// box-shadow: inset 0 -2px $selected_bg_color;
751
background-color: transparent;
752
color: $fg_color;
753
// transition: all $material_duration $material_timing_function, box-shadow 0 $material_timing_function $material_duration, color 0;
754
// &:active { transition: none; }
755
&:insensitive {
756
background-color: transparent;
757
color: $insensitive_fg_color;
758
> .label { color: inherit; }
759
}
760
}
761
}
762
763
&.selection-mode {
764
box-shadow: inset 0 1px $secondary_highlight_color;
765
background-color: $selected_bg_color;
766
color: $selected_fg_color;
767
&:backdrop {
768
}
769
770
.subtitle:link { @extend *:link:selected; }
771
772
.button {
773
border-image: -gtk-gradient(radial,
774
center bottom, 0,
775
center bottom, 0.001,
776
to($selected_fg_color),
777
to(transparent))
778
0 0 0 / 0 0 0px;
779
color: $secondary_selected_fg_color;
780
&:hover, &:active, &:checked {
781
color: $selected_fg_color;
782
}
783
784
&:insensitive {
785
}
786
787
&:checked {
788
border-image: -gtk-gradient(radial,
789
center bottom, 0,
790
center bottom, 0.5,
791
to($selected_fg_color),
792
to(transparent))
793
0 0 2 / 0 0 2px;
794
// box-shadow: inset 0 -2px $selected_fg_color;
795
color: $selected_fg_color;
796
&:insensitive {
797
color: $insensitive_selected_fg_color;
798
> .label { color: inherit; }
799
}
800
}
801
&.suggested-action {
802
// NOTE: do not use @extend .button;
803
@include button(normal);
804
&:hover { @include button(hover); }
805
&:active { @include button(active); }
806
&:insensitive { @include button(insensitive); }
807
}
808
}
809
810
.selection-menu {
811
padding-left: 16px;
812
padding-right: 16px;
813
814
GtkArrow { -GtkArrow-arrow-scaling: 1; }
815
816
.arrow {
817
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
818
}
819
}
820
}
821
822
.tiled &, .maximized & {
823
border-radius: 0; // squared corners when the window is max'd or tiled
824
box-shadow: none;
825
}
826
827
&.default-decoration {
828
padding: $container_padding;
829
border-width: 0;
830
.button { padding: 4px; }
831
}
832
}
833
834
/************
835
* Pathbars *
836
************/
837
838
.path-bar .button {
839
padding: 7px 6px 8px;
840
&.image-button { padding: 10px; }
841
&:only-child {
842
padding-left: 16px;
843
padding-right: 16px;
844
}
845
846
// the following is for spacing the icon and the label inside the home button
847
.label:last-child { padding-left: 2px; }
848
.label:first-child { padding-right: 2px; }
849
.label:only-child { padding-right: 0; padding-left: 0; }
850
GtkImage { padding-top: 1px; }
851
}
852
853
/**************
854
* Tree Views *
855
**************/
856
GtkTreeView.view {
857
-GtkTreeView-grid-line-width: 1;
858
-GtkTreeView-grid-line-pattern: '';
859
-GtkTreeView-tree-line-width: 1;
860
-GtkTreeView-tree-line-pattern: '';
861
-GtkTreeView-expander-size: 16;
862
863
border-left-color: $track_color; // this is actually the tree lines color,
864
border-top-color: $borders_color; // while this is the grid lines color, better then nothing
865
866
&.rubberband { @extend .rubberband; } // to avoid borders being overridden by the previously set props
867
868
border-radius: 0; // rest border radius in lists
869
870
&:hover, &:active, &:selected { border-radius: 0; }
871
872
&.dnd {
873
border-style: solid none;
874
border-width: 1px;
875
border-color: mix($fg_color, $selected_bg_color, 50%);
876
}
877
878
&.expander {
879
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
880
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
881
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
882
&:selected {
883
color: scale-alpha($selected_fg_color, $enabled_opacity);
884
&:hover, &:active { color: $selected_fg_color; }
885
}
886
}
887
888
&.progressbar { // progress bar in treeviews
889
@extend .entry.progressbar;
890
border-width: 4px;
891
&:selected {
892
border-color: currentColor;
893
}
894
}
895
896
&.trough { // progress bar trough in treeviews
897
@extend .entry.progressbar;
898
border-width: 4px;
899
border-color: scale-alpha($selected_bg_color, $lower_opacity);
900
&:selected {
901
border-color: $track_color;
902
}
903
}
904
}
905
906
column-header {
907
.button {
908
@extend .list-row.activatable;
909
padding: 3px 6px 4px;
910
border-style: none solid solid none;
911
border-width: 1px;
912
border-color: $borders_color;
913
border-radius: 0;
914
box-shadow: none;
915
background-color: $base_color;
916
// font-weight: bold;
917
&:hover, &:active {
918
box-shadow: none;
919
}
920
&:insensitive {
921
background-color: $base_color;
922
}
923
&.dnd {
924
@extend column-header.button.dnd;
925
}
926
}
927
&:last-child .button,
928
&:last-child.button { //treeview-like derived widgets in Banshee and Evolution
929
border-right-style: none;
930
}
931
}
932
933
column-header.button.dnd { // for treeview-like derive widgets
934
// transition: none;
935
border-left-style: solid;
936
color: $selected_bg_color;
937
}
938
939
940
/*********
941
* Menus *
942
*********/
943
.menubar {
944
-GtkWidget-window-dragging: true;
945
padding: 0px;
946
box-shadow: inset 0 -1px $borders_color;
947
background-color: $dark_color;
948
& > .menuitem {
949
padding: 4px 8px;
950
color: $secondary_fg_color;
951
&:hover { //Seems like it :hover even with keyboard focus
952
box-shadow: inset 0 -2px $selected_bg_color;
953
color: $fg_color;
954
}
955
&:insensitive {
956
color: $insensitive_fg_color;
957
box-shadow: none;
958
}
959
}
960
}
961
962
.menu {
963
margin: 4px;
964
padding: 0px;
965
background-color: $base_color;
966
border: 1px solid $borders_color; // adds borders in a non composited env
967
.csd & { border: none; } // axes borders in a composited env
968
.menuitem {
969
transition-duration: 0.1s;
970
padding: 3px 4px 4px;
971
font: initial;
972
text-shadow: none;
973
&:hover {
974
transition-duration: 0;
975
color: $selected_fg_color;
976
background-color: $selected_bg_color;
977
}
978
&:insensitive {
979
color: $insensitive_fg_color;
980
}
981
//submenu indicators
982
&.arrow { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
983
&.arrow:dir(rtl) {-gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl'); }
984
}
985
&.button { // overlow buttons
986
border-style: none;
987
border-radius: 0;
988
&.top { border-bottom: 1px solid $borders_color; }
989
&.bottom { border-top: 1px solid $borders_color; }
990
&:hover { background-color: $track_color; }
991
&:insensitive {
992
color: transparent;
993
background-color: transparent;
994
border-color: transparent ;
995
}
996
}
997
}
998
999
.menuitem .accelerator { color: gtkalpha(currentColor, $hint_opacity); }
1000
1001
1002
/***************
1003
* Popovers *
1004
***************/
1005
1006
.popover {
1007
padding: 2px;
1008
border: 1px solid;
1009
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.3);
1010
border-radius: 2px + 1px;
1011
background-color: $secondary_base_color;
1012
box-shadow: $z-depth-2;
1013
&:backdrop { box-shadow: $z-depth-1; }
1014
1015
> .list,
1016
> .view,
1017
> .toolbar,
1018
&.osd > .toolbar {
1019
border-style: none;
1020
border-image: none;
1021
background-color: transparent;
1022
}
1023
1024
.button.flat {
1025
padding: 5px 8px 6px;
1026
background-color: transparent;
1027
background-size: (128px / 0.8) (128px / 0.8), auto;
1028
color: $fg_color;
1029
font: initial;
1030
}
1031
1032
.linked > .button {
1033
border-radius: 2px;
1034
// @extend .button.flat;
1035
@include button(flat);
1036
&:hover { @include button(flat-hover); }
1037
&:active { @include button(flat-active); }
1038
&:insensitive { @include button(flat-insensitive); }
1039
&:checked { @include button(checked); }
1040
&:checked:insensitive { @include button(checked-insensitive); }
1041
&.image-button { background-size: ($medium_size * 2 / 0.8) ($medium_size * 2 / 0.8), auto; }
1042
}
1043
1044
&.osd { @extend %osd; }
1045
}
1046
1047
/*****************
1048
* Notebooks and *
1049
* Tabs *
1050
*****************/
1051
1052
.notebook {
1053
// Through me you go to the grief wracked city;
1054
// Through me you go to everlasting pain;
1055
// Through me you go a pass among lost souls.
1056
// ...
1057
// Abandon all hope — Ye Who Enter Here
1058
padding: 0;
1059
background-color: $base_color;
1060
-GtkNotebook-initial-gap: 6;
1061
-GtkNotebook-arrow-spacing: 5;
1062
-GtkNotebook-tab-curvature: 0;
1063
-GtkNotebook-tab-overlap: 1;
1064
-GtkNotebook-has-tab-gap: false;
1065
-GtkWidget-focus-padding: 0;
1066
-GtkWidget-focus-line-width: 0;
1067
&.frame {
1068
border: 1px solid $borders_color;
1069
// FIXME doesn't work
1070
&.top { border-top-width: 0; }
1071
&.bottom { border-bottom-width: 0; }
1072
&.right { border-right-width: 0; }
1073
&.left { border-left-width: 0; }
1074
}
1075
&.header {
1076
// FIXME: double borders in some case, can't fix it w/o a class tho
1077
// FIXME: doesn't work on dark var
1078
background-color: $dark_color;
1079
1080
// this is the shading of the header behind the tabs
1081
&.frame {
1082
border: 1px solid $borders_color;
1083
&.top { border-bottom-width: 0; }
1084
&.bottom { border-top-width: 0; }
1085
&.right { border-left-width: 0; }
1086
&.left { border-right-width: 0; }
1087
}
1088
1089
&.top {
1090
box-shadow: inset 0 -1px $borders_color; // border
1091
}
1092
&.bottom {
1093
box-shadow: inset 0 1px $borders_color;
1094
}
1095
&.right {
1096
box-shadow: inset 1px 0 $borders_color;
1097
}
1098
&.left {
1099
box-shadow: inset -1px 0 $borders_color;
1100
}
1101
}
1102
tab {
1103
border-width: 0;
1104
border-style: solid;
1105
border-color: transparent;
1106
background-color: transparent;
1107
1108
outline-offset: 0;
1109
1110
$tab_indicator_size: 2px;
1111
//vertical tab sizing
1112
$vt_vpadding: 8px;
1113
$vt_hpadding: 20px;
1114
// horizontal tab sizing
1115
$ht_vpadding: 5px;
1116
$ht_hpadding: 20px;
1117
1118
//FIXME: we get double border in some cases, not considering the broken
1119
//notebook content frame...
1120
&.top, &.bottom { padding: $vt_vpadding $vt_hpadding; }
1121
&.left, &.right { padding: $ht_vpadding $ht_hpadding; }
1122
1123
1124
/* works for testnotebookdnd, but there's a superfluous border
1125
in gedit or web, commented out for now, needs gtk fixes
1126
&.reorderable-page {
1127
&.top {
1128
padding-top: ($vt_vpadding - 1px);
1129
border-top-width: 1px;
1130
border-left-width: 1px;
1131
border-right-width: 1px;
1132
}
1133
&.bottom {
1134
padding-bottom: ($vt_vpadding - 1px);
1135
border-bottom-width: 1px;
1136
border-left-width: 1px;
1137
border-right-width: 1px;
1138
}
1139
&.left {
1140
padding-left: ($ht_hpadding - 1px);
1141
border-left-width: 1px;
1142
border-top-width: 1px;
1143
border-bottom-width: 1px;
1144
}
1145
&.right {
1146
padding-right: ($ht_hpadding - 1px);
1147
border-right-width: 1px;
1148
border-top-width: 1px;
1149
border-bottom-width: 1px;
1150
}
1151
}
1152
*/
1153
&.reorderable-page {
1154
-GtkNotebook-tab-overlap: 1;
1155
&.top, &.bottom {
1156
padding-left: 12px; // for a nicer close button
1157
padding-right: 12px; // placement
1158
border-left-width: 1px;
1159
border-right-width: 1px;
1160
}
1161
&.left, &.right {
1162
border-bottom-width: 1px;
1163
border-top-width: 1px;
1164
}
1165
}
1166
&.top {
1167
//padding-bottom: ($vt_vpadding -$tab_indicator_size);
1168
border-bottom-width: $tab_indicator_size;
1169
}
1170
&.bottom {
1171
//padding-top: ($vt_vpadding -$tab_indicator_size);
1172
border-top-width: $tab_indicator_size;
1173
}
1174
&.left {
1175
//padding-right: ($ht_hpadding -$tab_indicator_size);
1176
border-right-width: $tab_indicator_size;
1177
}
1178
&.right {
1179
//padding-left: ($ht_hpadding -$tab_indicator_size);
1180
border-left-width: $tab_indicator_size;
1181
}
1182
1183
//here's the interesting stuff
1184
&:hover, &.prelight-page {
1185
border-color: $track_color;
1186
}
1187
&:active, &.active-page {
1188
border-color: $selected_bg_color;
1189
}
1190
@each $_tab, $_border in (top, bottom),
1191
(bottom, top),
1192
(left, right),
1193
(right, left) {
1194
&.reorderable-page.#{$_tab} {
1195
border-color: transparent;
1196
&:hover, &.prelight-page {
1197
border-color: $borders_color;
1198
border-#{$_border}-width: 1px;
1199
border-#{$_border}-color: transparent;
1200
background-color: $bg_color;
1201
}
1202
&:active, &.active-page {
1203
border-color: $borders_color;
1204
border-#{$_border}-width: 1px;
1205
border-#{$_border}-color: transparent;
1206
background-color: $light_color;
1207
}
1208
}
1209
}
1210
.label { //tab text
1211
padding: 0 2px; // needed for a nicer focus ring
1212
font-weight: bold;
1213
color: $secondary_fg_color;
1214
}
1215
.prelight-page .label, .label.prelight-page {
1216
// prelight tab text
1217
color: $fg_color;
1218
}
1219
.active-page .label, .label.active-page {
1220
// active tab text
1221
color: $fg_color;
1222
}
1223
.button { //tab close button
1224
padding: 0;
1225
@extend %image_button;
1226
background-size: ($small_size / 0.8) ($small_size / 0.8), auto;
1227
// @extend .button.flat;
1228
@include button(flat);
1229
&:hover { @include button(flat-hover); }
1230
&:active { @include button(flat-active); }
1231
&:insensitive { @include button(flat-insensitive); }
1232
& > GtkImage { // this is a hack which makes tabs grow
1233
padding: 4px;
1234
}
1235
}
1236
}
1237
&.arrow {
1238
&:not(:hover):not(:active) { color: gtkalpha(currentColor, $enabled_opacity); }
1239
&:insensitive {
1240
color: $insensitive_fg_color;
1241
}
1242
}
1243
&:not(.reorderable-page) > .entry {
1244
@extend .entry.flat;
1245
}
1246
}
1247
1248
/**************
1249
* Scrollbars *
1250
**************/
1251
1252
$_slider_margin: 4px;
1253
$_slider_fine_tune_margin: 6px;
1254
1255
.scrollbar {
1256
-GtkRange-slider-width: 8 + $_slider_margin * 2 + 1;
1257
-GtkRange-trough-border: 0;
1258
-GtkScrollbar-has-backward-stepper: false;
1259
-GtkScrollbar-has-forward-stepper: false;
1260
-GtkScrollbar-min-slider-length: 24 + $_slider_margin * 2;
1261
// minimum size for the slider.
1262
// sadly can't be in '.slider'
1263
// where it belongs
1264
-GtkRange-stepper-spacing: 0;
1265
-GtkRange-trough-under-steppers: 1;
1266
1267
.button {
1268
border: none;
1269
}
1270
1271
&.overlay-indicator {
1272
&:not(.dragging):not(.hovering) { // Overlay scrolling indicator
1273
-GtkRange-slider-width: 12px;
1274
1275
.slider {
1276
margin: 2px;
1277
border: 2px solid scale-alpha($base_color, $lower_opacity);
1278
// background-clip: padding-box;
1279
}
1280
1281
.trough {
1282
border-style: none;
1283
background-color: transparent;
1284
}
1285
1286
// w/o the following margin tweaks the slider shrinks when hovering/dragging
1287
&.vertical .slider {
1288
// margin-top: $_slider_margin - 1px;
1289
// margin-bottom: $_slider_margin - 1px;
1290
}
1291
1292
&.horizontal .slider {
1293
// margin-left: $_slider_margin - 1px;
1294
// margin-right: $_slider_margin - 1px;
1295
}
1296
1297
}
1298
1299
&.dragging,
1300
&.hovering {
1301
.trough {
1302
background-color: scale-alpha($base_color, $higher_opacity);
1303
}
1304
}
1305
}
1306
1307
// trough coloring
1308
.trough {
1309
background-color: $base_color;
1310
border: 1px none $borders_color;
1311
}
1312
1313
// slider coloring
1314
.slider {
1315
background-color: $tertiary_fg_color;
1316
&:hover { background-color: $secondary_fg_color; }
1317
&:active { background-color: $fg_color; }
1318
&:insensitive {
1319
opacity: $disabled_opacity;
1320
}
1321
}
1322
1323
1324
// sizing
1325
.slider {
1326
border-radius: 100px;
1327
margin: $_slider_margin;
1328
}
1329
1330
&.fine-tune .slider { margin: $_slider_fine_tune_margin; }
1331
1332
&.vertical {
1333
1334
.slider {
1335
margin-left: 1px + $_slider_margin;
1336
1337
&:dir(rtl) {
1338
margin-left: $_slider_margin;
1339
margin-right: 1px + $_slider_margin;
1340
}
1341
}
1342
1343
&.fine-tune .slider {
1344
margin-left: 1px + $_slider_fine_tune_margin;
1345
1346
&:dir(rtl) {
1347
margin-left: $_slider_fine_tune_margin;
1348
margin-right: 1px + $_slider_fine_tune_margin;
1349
}
1350
}
1351
1352
.trough {
1353
border-left-style: solid;
1354
1355
&:dir(rtl) {
1356
border-left-style: none;
1357
border-right-style: solid;
1358
}
1359
}
1360
}
1361
1362
&.horizontal {
1363
1364
.slider { margin-top: 1px + $_slider_margin; }
1365
1366
&.fine-tune .slider { margin-top: 1px + $_slider_fine_tune_margin; }
1367
1368
.trough { border-top-style: solid; }
1369
}
1370
}
1371
1372
.scrollbars-junction,
1373
.scrollbars-junction.frame { // the small square between two scrollbars
1374
border-style: solid none none solid;
1375
background-color: $base_color;
1376
1377
&:dir(rtl) { border-style: solid solid none none; }
1378
}
1379
1380
1381
/**********
1382
* Switch *
1383
**********/
1384
1385
GtkSwitch {
1386
-GtkSwitch-slider-width: 28px; // 55px is the right value to make it as tall
1387
// as buttons, not doing that for now
1388
-GtkSwitch-slider-height: 28px;
1389
1390
outline-offset: -4px;
1391
outline-radius: 100px;
1392
font-size: 0;
1393
&.trough {
1394
// similar to the .scale
1395
border: 10px solid transparent;
1396
border-radius: 100px;
1397
background-color: $track_color;
1398
&:insensitive {
1399
color: $insensitive_fg_color;
1400
}
1401
&:active {
1402
background-color: $accent_bg_color;
1403
&:insensitive {
1404
background-color: $track_color;
1405
color: $accent_bg_color;
1406
}
1407
}
1408
}
1409
&.slider {
1410
padding: 4px;
1411
border-radius: 100px;
1412
@include entry(normal);
1413
&:hover { @include entry(focus); }
1414
&:insensitive { @include entry(insensitive); }
1415
}
1416
.list-row:selected & {
1417
}
1418
1419
}
1420
1421
/*************************
1422
* Check and Radio items *
1423
*************************/
1424
1425
// draw regular check and radio items using our PNG assets
1426
// all assets are rendered from assets.svg. never add pngs directly
1427
1428
@each $w,$a in ('check', 'checkbox'),
1429
('radio','radio') {
1430
1431
//standard checks and radios
1432
@each $s,$as in ('','-unchecked'),
1433
(':active', '-unchecked-active'),
1434
(':insensitive','-unchecked-insensitive'),
1435
(':inconsistent', '-mixed'),
1436
(':inconsistent:active', '-mixed-active'),
1437
(':inconsistent:insensitive', '-mixed-insensitive'),
1438
(':checked', '-checked'),
1439
(':checked:active', '-checked-active'),
1440
(':checked:insensitive','-checked-insensitive') {
1441
.#{$w}#{$s} {
1442
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}#{$asset_suffix}.png"),
1443
url("assets/#{$a}#{$as}#{$asset_suffix}@2.png"));
1444
icon-shadow: $z-depth-1;
1445
&:hover, &:active { icon-shadow: $z-depth-2; }
1446
&:insensitive { icon-shadow: none; }
1447
&.button.flat { }
1448
}
1449
}
1450
1451
//menu
1452
@each $s,$as in ('',''),
1453
// (':active', '-checked'),
1454
(':insensitive','-insensitive'),
1455
(':inconsistent', '-mixed'),
1456
// (':inconsistent:active', '-mixed'),
1457
(':inconsistent:insensitive', '-mixed-insensitive'),
1458
(':checked', '-checked'),
1459
// (':checked:active', '-checked'),
1460
(':checked:insensitive','-checked-insensitive') {
1461
.menu .menuitem.#{$w}#{$s} {
1462
// color: gtkalpha(currentColor, $hint_opacity);
1463
// -gtk-icon-source: -gtk-icontheme('#{$a}-symbolic');
1464
// &:active, &:checked { -gtk-icon-source: -gtk-icontheme('#{$a}-checked-symbolic'); }
1465
// &:inconsistent { -gtk-icon-source: -gtk-icontheme('#{$a}-mixed-symbolic'); }
1466
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}-symbolic#{$asset_suffix}.png"),
1467
url("assets/#{$a}#{$as}-symbolic#{$asset_suffix}@2.png"));
1468
icon-shadow: none;
1469
&:hover {
1470
-gtk-icon-source: -gtk-scaled(url("assets/#{$a}#{$as}-symbolic-dark.png"),
1471
url("assets/#{$a}#{$as}-symbolic-dark@2.png"));
1472
}
1473
}
1474
}
1475
}
1476
1477
//treeview and list-rows
1478
.view.check, .view.radio,
1479
.list-row .check, list-row .radio {
1480
}
1481
1482
//selection-mode
1483
@each $s,$as in ('','-selectionmode'),
1484
(':active', '-active-selectionmode'),
1485
(':insensitive', '-insensitive-selectionmode'),
1486
(':checked', '-checked-selectionmode'),
1487
(':checked:active', '-checked-active-selectionmode'),
1488
(':insensitive:checked', '-checked-insensitive-selectionmode') {
1489
.view.content-view.check#{$s}:not(.list) {
1490
-gtk-icon-source: -gtk-scaled(url("assets/checkbox#{$as}.png"),
1491
url("assets/checkbox#{$as}@2.png"));
1492
background-color: transparent;
1493
}
1494
}
1495
1496
GtkCheckButton.text-button, GtkRadioButton.text-button {
1497
// this is for a nice focus on check and radios text
1498
padding: 2px 4px;
1499
outline-offset: 0;
1500
&:insensitive,
1501
&:insensitive:active,
1502
&:insensitive:inconsistent {
1503
// set insensitive color, which is overriden otherwise
1504
// color: $insensitive_fg_color;
1505
}
1506
}
1507
1508
/************
1509
* GtkScale *
1510
************/
1511
.scale,
1512
.scale.scale-has-marks-above.scale-has-marks-below,
1513
.scale.vertical.scale-has-marks-above.scale-has-marks-below {
1514
// FIXME: rationalize
1515
-GtkScale-slider-length: 20;
1516
-GtkRange-slider-width: 20;
1517
-GtkRange-trough-border: 2;
1518
outline-offset: -8px;
1519
outline-radius: 100px;
1520
1521
&.fine-tune {
1522
&.slider { background-size: 80%; }
1523
}
1524
1525
&.slider {
1526
&:not(:hover):not(:active) { background-size: 80%; }
1527
// @include entry(normal);
1528
// border-radius: 50%;
1529
// background-color: $accent_bg_color;
1530
@each $s,$as in ('',''),
1531
// (':hover','-hover'),
1532
(':active','-active'),
1533
(':insensitive','-insensitive') {
1534
&.slider#{$s} {
1535
$_url: 'assets/slider#{$as}#{$asset_suffix}';
1536
border-style: none;
1537
border-radius: 0;
1538
background-color: transparent;
1539
background-image: -gtk-scaled(url('#{$_url}.png'),
1540
url('#{$_url}@2.png'));
1541
background-repeat: no-repeat;
1542
background-position: center;
1543
box-shadow: none;
1544
}
1545
}
1546
&:hover {
1547
// @include entry(focus);
1548
// border-radius: 50%; // needed for double marks scales
1549
}
1550
&:insensitive {
1551
// @include entry(insensitive);
1552
// border-radius: 50%; // overridden
1553
}
1554
//OSD sliders
1555
.osd & {
1556
}
1557
}
1558
&.trough {
1559
margin: 10px 12px;
1560
background-color: $track_color;
1561
&.highlight {
1562
background-color: $accent_bg_color;
1563
&:insensitive { background-color: $track_color; }
1564
}
1565
&:insensitive { color: $insensitive_fg_color; }
1566
&.vertical { margin: 12px 10px; }
1567
//OSD troughs
1568
.osd & {
1569
}
1570
}
1571
// marks color
1572
&.separator {
1573
color: $track_color;
1574
}
1575
// scales on selected list rows
1576
.list-row:selected & {
1577
}
1578
}
1579
1580
@each $d,$dn in ('', 'horz'),
1581
('.vertical', 'vert') {
1582
@each $w,$we in ('scale-has-marks-below','scale_marks_below'),
1583
('scale-has-marks-above','scale_marks_above') {
1584
.scale#{$d}.#{$w} {
1585
-GtkScale-slider-length: 20;
1586
-GtkRange-slider-width: 25;
1587
-GtkRange-trough-border: 2;
1588
1589
@extend %#{$we}_#{$dn};
1590
1591
@each $s,$as in ('',''),
1592
// (':hover','-hover'),
1593
(':active','-active'),
1594
(':insensitive','-insensitive') {
1595
&.slider#{$s} {
1596
$_url: 'assets/slider-#{$dn}-#{$w}#{$as}#{$asset_suffix}';
1597
border-style: none;
1598
border-radius: 0;
1599
background-color: transparent;
1600
background-image: -gtk-scaled(url('#{$_url}.png'),
1601
url('#{$_url}@2.png'));
1602
background-repeat: no-repeat;
1603
background-position: center;
1604
box-shadow: none;
1605
}
1606
}
1607
}
1608
}
1609
}
1610
1611
%scale_marks_above_horz {
1612
.trough { margin: 15px 12px 10px; }
1613
}
1614
%scale_marks_below_horz {
1615
.trough { margin: 10px 12px 15px; }
1616
}
1617
%scale_marks_above_vert {
1618
.trough { margin: 12px 10px 12px 15px; }
1619
}
1620
%scale_marks_below_vert {
1621
.trough { margin: 12px 15px 12px 10px; }
1622
}
1623
1624
/*****************
1625
* Progress bars *
1626
*****************/
1627
1628
GtkProgressBar {
1629
-GtkProgressBar-min-horizontal-bar-height: 4;
1630
-GtkProgressBar-min-vertical-bar-width: 4;
1631
padding: 0;
1632
font-size: smaller;
1633
color: $tertiary_fg_color;
1634
&.osd {
1635
-GtkProgressBar-xspacing: 0;
1636
-GtkProgressBar-yspacing: 0;
1637
-GtkProgressBar-min-horizontal-bar-height: 4;
1638
}
1639
&.trough { // background
1640
border-radius: 0;
1641
background-color: scale-alpha($selected_bg_color, $lower_opacity);
1642
&.osd {
1643
border-style: none;
1644
box-shadow: none;
1645
// background-color: transparent;
1646
}
1647
}
1648
}
1649
1650
// moving bit
1651
.progressbar {
1652
border-radius: 0;
1653
background-color: $selected_bg_color;
1654
&.left {
1655
border-top-left-radius: 0;
1656
border-bottom-left-radius: 0;
1657
}
1658
&.right {
1659
border-top-right-radius: 0;
1660
border-bottom-right-radius: 0;
1661
}
1662
&.left.right {
1663
box-shadow: none;
1664
}
1665
&.vertical {
1666
&.bottom {
1667
border-bottom-left-radius: 0;
1668
border-bottom-right-radius: 0;
1669
box-shadow: none;
1670
}
1671
&.top {
1672
border-top-left-radius: 0;
1673
border-top-right-radius: 0;
1674
}
1675
}
1676
&.osd {
1677
background-image: none;
1678
background-color: $selected_bg_color;
1679
border-style: none;
1680
border-radius: 0;
1681
}
1682
}
1683
1684
1685
/*************
1686
* Level Bar *
1687
*************/
1688
1689
.level-bar {
1690
box-shadow: $z-depth-1; // needs to be set here to avoid clipping
1691
-GtkLevelBar-min-block-width: 36;
1692
-GtkLevelBar-min-block-height: 4;
1693
&.vertical {
1694
-GtkLevelBar-min-block-width: 4;
1695
-GtkLevelBar-min-block-height: 36;
1696
}
1697
&.trough {
1698
padding: 2px;
1699
border-radius: 2px;
1700
@include entry(normal);
1701
&:insensitive { @include entry(insensitive); }
1702
&.indicator-discrete {
1703
&.horizontal { padding: 2px 1px; }
1704
&.vertical { padding: 1px 2px; }
1705
}
1706
}
1707
&.fill-block {
1708
// FIXME: it would be nice to set make fill blocks bigger, but we'd need
1709
// :nth-child working on discrete indicators
1710
background-color: $selected_bg_color;
1711
border-radius: 0;
1712
box-shadow: none;
1713
&.indicator-discrete {
1714
&.horizontal { margin: 0 1px; }
1715
&.vertical { margin: 1px 0; }
1716
}
1717
&.level-high {
1718
background-color: $success_color;
1719
}
1720
&.level-low {
1721
background-color: $warning_color;
1722
}
1723
&.empty-fill-block {
1724
background-color: $track_color;
1725
}
1726
}
1727
}
1728
1729
1730
/**********
1731
* Frames *
1732
**********/
1733
.frame {
1734
border: 1px solid $borders_color;
1735
&.flat { border-style: none; }
1736
padding: 0;
1737
&.action-bar {
1738
padding: $container_padding;
1739
border-width: 1px 0 0;
1740
}
1741
}
1742
1743
GtkScrolledWindow {
1744
GtkViewport.frame { // avoid double borders when viewport inside
1745
// scrolled window
1746
border-style: none;
1747
}
1748
}
1749
1750
//vbox and hbox separators
1751
.separator {
1752
// always disable separators
1753
// -GtkWidget-wide-separators: true;
1754
color: $borders_color;
1755
1756
// Font and File button separators
1757
GtkFileChooserButton &.vertical,
1758
GtkFontButton &.vertical {
1759
// always disable separators
1760
-GtkWidget-wide-separators: true;
1761
}
1762
}
1763
1764
/*********
1765
* Lists *
1766
*********/
1767
1768
.list {
1769
border-color: $borders_color;
1770
background-color: $base_color;
1771
}
1772
1773
.list-row,
1774
.grid-child {
1775
padding: 2px;
1776
}
1777
1778
.list-row.activatable {
1779
// let's take care of background colors
1780
background-image: -gtk-gradient(radial,
1781
center center, 0,
1782
center center, 0.5,
1783
to(gtkalpha(currentColor, 0)),
1784
to(transparent)),
1785
linear-gradient(to bottom, gtkalpha(currentColor, 0));
1786
background-repeat: no-repeat;
1787
background-position: center, center;
1788
background-size: (192px / 0.8) (192px / 0.8), auto;
1789
&:hover {
1790
background-image: -gtk-gradient(radial,
1791
center center, 0,
1792
center center, 0.5,
1793
to(gtkalpha(currentColor, 0)),
1794
to(transparent)),
1795
linear-gradient(to bottom, gtkalpha(currentColor, 0.05));
1796
}
1797
&:active {
1798
animation: list_ripple_effect $material_duration $material_timing_function forwards;
1799
}
1800
}
1801
1802
.list-row:selected {
1803
@extend %selected_items;
1804
.button {
1805
&:insensitive { color: $insensitive_secondary_selected_fg_color; }
1806
&.flat {
1807
color: $secondary_selected_fg_color;
1808
&:hover, &:active { color: $selected_fg_color; }
1809
&:insensitive { color: $insensitive_secondary_selected_fg_color; }
1810
}
1811
}
1812
}
1813
1814
// transition
1815
.list-row {
1816
&:hover { transition: none; }
1817
}
1818
1819
1820
/*********************
1821
* App Notifications *
1822
*********************/
1823
1824
.app-notification,
1825
.app-notification.frame {
1826
@extend %osd;
1827
@extend .toolbar.osd;
1828
.button {
1829
}
1830
}
1831
1832
/*************
1833
* Expanders *
1834
*************/
1835
1836
.expander {
1837
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
1838
&:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
1839
&:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
1840
&:not(:hover):not(:active) { color: gtkalpha(currentColor, $enabled_opacity); }
1841
&:selected { color: $selected_fg_color; }
1842
}
1843
1844
/************
1845
* Calendar *
1846
***********/
1847
GtkCalendar {
1848
border: 1px solid $borders_color;
1849
color: $fg_color;
1850
1851
&:selected {
1852
@extend .view:selected;
1853
}
1854
1855
&.header {
1856
border: 1px solid transparent;
1857
border-bottom-color: $borders_color;
1858
border-radius: 0;
1859
}
1860
1861
&.button {
1862
// @extend .button.flat;
1863
@include button(flat);
1864
&:hover { @include button(flat-hover); }
1865
&:active { @include button(flat-active); }
1866
&:insensitive { @include button(flat-insensitive); }
1867
}
1868
1869
&:inconsistent { color: gtkalpha(currentColor, $hint_opacity); }
1870
&.highlight {
1871
font-size: smaller;
1872
color: gtkalpha(currentColor, $hint_opacity);
1873
}
1874
}
1875
1876
/***********
1877
* Dialogs *
1878
***********/
1879
1880
.message-dialog .dialog-action-area .button {
1881
padding: 8px;
1882
}
1883
1884
.message-dialog { // Message Dialog styling
1885
&.background { background-color: $light_color; }
1886
.titlebar {
1887
border-style: none;
1888
// box-shadow: inset 0 1px $highlight_color;
1889
background-color: $light_color;
1890
}
1891
&.csd { // rounded bottom border styling for csd version
1892
&.background {
1893
// bigger radius for better antialiasing
1894
border-bottom-left-radius: 2px;
1895
border-bottom-right-radius: 2px;
1896
}
1897
.dialog-action-area .button {
1898
@extend .button.flat;
1899
padding: 9px 16px 10px;
1900
border-top: 1px solid $borders_color;
1901
border-radius: 0;
1902
background-size: (192px / 0.8) (192px / 0.8), auto;
1903
// &:first-child{ border-bottom-left-radius: 2px; }
1904
// &:last-child { border-bottom-right-radius: 2px; }
1905
&:first-child{ border-radius: 0 0 0 2px; }
1906
&:last-child { border-radius: 0 0 2px 0; }
1907
}
1908
}
1909
}
1910
1911
GtkFileChooserDialog {
1912
.search-bar {
1913
// background-color: $base_color;
1914
// border-color: $bg_color;
1915
}
1916
.dialog-action-box {
1917
border-top: 1px solid $borders_color;
1918
}
1919
}
1920
1921
/***********
1922
* Sidebar *
1923
***********/
1924
1925
.sidebar {
1926
border: none;
1927
background-color: $secondary_base_color;
1928
1929
&:selected {
1930
@extend %selected_items;
1931
}
1932
}
1933
1934
GtkSidebarRow {
1935
// Needs overriding of the GtkListBoxRow padding
1936
&.list-row {
1937
padding: 0px;
1938
}
1939
// Using margins/padding directly in the SidebarRow
1940
// will make the animation of the new bookmark row jump
1941
.sidebar-revealer {
1942
padding: 4px 14px 4px 12px;
1943
}
1944
.sidebar-icon {
1945
opacity: $hint_opacity; // dim the device icons
1946
&:dir(ltr) { padding-right: 8px; }
1947
&:dir(rtl) { padding-left: 8px; }
1948
}
1949
.sidebar-label {
1950
&:dir(ltr) { padding-right: 2px; }
1951
&:dir(rtl) { padding-left: 2px; }
1952
}
1953
}
1954
1955
GtkPlacesSidebar.sidebar {
1956
// in the sidebar case it makes no sense to click the selected row
1957
// .list-row:selected:active { box-shadow: none; }
1958
1959
// looks like the label doesn't get all the states so work around
1960
.list-row:selected:insensitive .label { @extend %selected_items:insensitive; }
1961
// .list-row:selected:backdrop:insensitive .label { @extend %selected_items:backdrop:insensitive; }
1962
1963
.sidebar-placeholder-row {
1964
border: solid 1px $selected_bg_color;
1965
}
1966
1967
.sidebar-new-bookmark-row {
1968
color: $accent_bg_color;
1969
}
1970
1971
@at-root .sidebar-button.button { // @at-root needded to not change the specificity making button styling inheritance broken
1972
// so istead of "GtkPlacesSidebar.sidebar .sidebar-button.button" [specificity 0,0,3,1]
1973
// the extended selector ".sidebar-button.button" [specificity 0,0,2,0]
1974
1975
&.image-button { padding: 4px; }
1976
1977
@extend .button.flat;
1978
// border-radius: 100%;
1979
// outline-radius: 100%;
1980
}
1981
// this is for indicating which sidebar row generated a popover
1982
// see https://bugzilla.gnome.org/show_bug.cgi?id=754411
1983
.has-open-popup { @extend .list-row.activatable:active; transition: none; }
1984
}
1985
1986
.sidebar-item {
1987
padding: 10px 4px;
1988
> .label {
1989
padding-left: 6px;
1990
padding-right: 6px;
1991
}
1992
&.needs-attention > .label {
1993
@extend %needs_attention;
1994
}
1995
}
1996
1997
/*********
1998
* Paned *
1999
*********/
2000
2001
GtkPaned { // this is for the standard paned separator
2002
2003
-GtkPaned-handle-size: 1; // sets separator width
2004
2005
-gtk-icon-source: none; // removes handle decoration
2006
margin: 0 8px 8px 0; // drag area of the separator, not a real margin
2007
&:dir(rtl) {
2008
margin-right: 0;
2009
margin-left: 8px;
2010
}
2011
.pane-separator {
2012
background-color: $borders_color;
2013
}
2014
}
2015
2016
GtkPaned.wide { // this is for the paned with wide separator
2017
-GtkPaned-handle-size: 6; // wider separator here
2018
margin: 0; // no need of the invisible drag area so, reset margin
2019
.pane-separator {
2020
background-color: transparent;
2021
border-style: none solid;
2022
border-color: $borders_color;
2023
border-width: 1px;
2024
}
2025
&.vertical .pane-separator { border-style: solid none;}
2026
}
2027
2028
2029
/**************
2030
* GtkInfoBar *
2031
**************/
2032
GtkInfoBar {
2033
border-style: none;
2034
}
2035
2036
.info {
2037
background-color: $info_bg_color;
2038
}
2039
2040
.question {
2041
background-color: $question_bg_color;
2042
}
2043
2044
.warning {
2045
background-color: $warning_bg_color;
2046
}
2047
2048
.error {
2049
background-color: $error_bg_color;
2050
}
2051
2052
.info,
2053
.question,
2054
.warning,
2055
.error {
2056
color: $selected_fg_color;
2057
.button {
2058
// @extend .list-row:selected.button;
2059
&:insensitive { color: $insensitive_secondary_selected_fg_color; }
2060
&.flat {
2061
color: $secondary_selected_fg_color;
2062
&:hover, &:active { color: $selected_fg_color; }
2063
&:insensitive { color: $insensitive_secondary_selected_fg_color; }
2064
}
2065
}
2066
.label:selected {
2067
}
2068
}
2069
2070
/************
2071
* Tooltips *
2072
************/
2073
2074
.tooltip {
2075
&.background {
2076
// background-color needs to be set this way otherwise it gets drawn twice
2077
// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
2078
background-color: scale-alpha($base_color, $higher_opacity);
2079
}
2080
2081
// @extend %osd;
2082
color: $fg_color;
2083
padding: 4px; /* not working */
2084
border-radius: 2px;
2085
box-shadow: none; // otherwise it gets inherited by windowframe.csd
2086
// FIXME: we need a border or tooltips vanish on black background.
2087
&.window-frame.csd {
2088
background-color: transparent;
2089
}
2090
}
2091
2092
.tooltip * { //Yeah this is ugly
2093
padding: 4px;
2094
background-color: transparent;
2095
color: inherit; // just to be sure
2096
}
2097
2098
/*****************
2099
* Color Chooser *
2100
*****************/
2101
2102
GtkColorSwatch {
2103
// This widget is made of two boxes one on top of the other, the lower box is GtkColorSwatch {} the other one
2104
// is GtkColorSwatch > .overlay {}, GtkColorSwatch has the programmatically set background, so most of the style
2105
// is applied to the overlay box.
2106
2107
box-shadow: $z-depth-1;
2108
2109
// we need to re-set the shadow here since it get axed by the previous bit
2110
&:selected { }
2111
2112
// base color corners rounding
2113
// to avoid the artifacts caused by rounded corner anti-aliasing the base color
2114
// sports a bigger radius.
2115
// nth-child is needed by the custom color strip.
2116
// The :not() madness is needed since actually the overlay is selectable by GtkColorSwatch > .overlay
2117
// and GtkColorSwatch.overlay, I know it's weird, but this is gtk+, not a browser.
2118
&.top {
2119
border-top-left-radius: 2px;
2120
border-top-right-radius: 2px;
2121
}
2122
&.bottom {
2123
border-bottom-left-radius: 2px;
2124
border-bottom-right-radius: 2px;
2125
}
2126
&.left, &:first-child:not(.overlay):not(.top) {
2127
border-top-left-radius: 2px;
2128
border-bottom-left-radius: 2px;
2129
}
2130
&.right, &:last-child:not(.overlay):not(.bottom) {
2131
border-top-right-radius: 2px;
2132
border-bottom-right-radius: 2px;
2133
}
2134
&:only-child:not(.overlay) { border-radius: 2px; }
2135
2136
// overlay corner rounding
2137
&.top > .overlay {
2138
border-top-left-radius: 2px;
2139
border-top-right-radius: 2px;
2140
}
2141
&.bottom > .overlay {
2142
border-bottom-left-radius: 2px;
2143
border-bottom-right-radius: 2px;
2144
}
2145
&:first-child:not(.top) > .overlay {
2146
border-top-left-radius: 2px;
2147
border-bottom-left-radius: 2px;
2148
}
2149
&:last-child:not(.bottom) > .overlay {
2150
border-top-right-radius: 2px;
2151
border-bottom-right-radius: 2px;
2152
}
2153
&:only-child > .overlay { border-radius: 2px; }
2154
2155
// hover effect
2156
&:hover { box-shadow: $z-depth-2; }
2157
2158
// no hover effect for the colorswatch in the color editor
2159
GtkColorEditor & {
2160
border-radius: 2px; // same radius as the entry
2161
&:hover { box-shadow: $z-depth-1; }
2162
}
2163
2164
// indicator and keynav outline colors
2165
&.color-dark {
2166
color: white;
2167
}
2168
&.color-light {
2169
color: scale-alpha(black, 0.8);
2170
}
2171
2172
// border color
2173
&.overlay,
2174
&.overlay:selected {
2175
}
2176
2177
// make the add color button looks like, well, a button
2178
&#add-color-button {
2179
background-image: linear-gradient(to right,
2180
$error_bg_color 25%,
2181
$warning_bg_color 25%, $warning_bg_color 50%,
2182
$info_bg_color 50%, $info_bg_color 75%,
2183
$question_bg_color 75%);
2184
color: white;
2185
}
2186
}
2187
2188
2189
/********
2190
* Misc *
2191
********/
2192
2193
//content view (grid/list)
2194
.content-view {
2195
background-color: $bg_color;
2196
// &:hover { -gtk-image-effect: highlight; }
2197
&.rubberband { @extend .rubberband; }
2198
}
2199
2200
.scale-popup {
2201
2202
.osd & { @extend %osd; }
2203
2204
.osd & .button.flat { //FIXME: quick hack, redo properly
2205
}
2206
2207
.button { // +/- buttons on GtkVolumeButton popup
2208
padding: 10px;
2209
}
2210
}
2211
2212
GtkScaleButton.button,
2213
GtkVolumeButton.button {
2214
// I assume both are image-button *by default*
2215
// with the image-button/text-button classes automagically applied depending on the button child these selectors can be deleted.
2216
@extend %image_button;
2217
2218
&.text-button { @extend .text-button }
2219
}
2220
2221
.floating-bar {
2222
@extend %osd;
2223
// @extend .toolbar.osd;
2224
padding: 3px 0 4px;
2225
border: 1px solid $borders_color;
2226
background-color: $base_color;
2227
transition: none;
2228
}
2229
2230
.floating-bar.bottom.left { /* axes left border and border radius */
2231
border-width: 1px 1px 0 0;
2232
border-radius: 0 2px + 1px 0 0;
2233
// border-width: 8px 8px 0 0;
2234
// border-image-width: 10px 10px 0 0;
2235
}
2236
2237
.floating-bar.bottom.right { /* axes right border and border radius */
2238
border-width: 1px 0 0 1px;
2239
border-radius: 2px + 1px 0 0 0;
2240
// border-width: 8px 0 0 8px;
2241
// border-image-width: 10px 0 0 10px;
2242
}
2243
2244
/**********************
2245
* Window Decorations *
2246
*********************/
2247
2248
.window-frame {
2249
transition: none;
2250
border-radius: 2px 2px 0 0;
2251
box-shadow: $z-depth-4;
2252
2253
// FIXME rationalize window-frame shadows
2254
2255
/* this is used for the resize cursor area */
2256
margin: 8px;
2257
2258
&:backdrop {
2259
box-shadow: $z-depth-2;
2260
}
2261
&.tiled {
2262
border-radius: 0;
2263
}
2264
&.popup {
2265
box-shadow: none;
2266
}
2267
// server-side decorations as used by mutter
2268
&.ssd {
2269
box-shadow: 0 0 0 1px $borders_color; //just doing borders, wm draws actual shadows
2270
}
2271
&.csd {
2272
&.popup {
2273
border-radius: 0;
2274
box-shadow: $z-depth-2;
2275
}
2276
&.tooltip {
2277
border-radius: 2px;
2278
box-shadow: $z-depth-2;
2279
}
2280
&.message-dialog {
2281
border-radius: 2px;
2282
box-shadow: $z-depth-4;
2283
&:backdrop { box-shadow: $z-depth-2; }
2284
}
2285
}
2286
&.solid-csd {
2287
border-radius: 0;
2288
margin: 4px;
2289
background-color: $warning_color;
2290
border: solid 1px $borders_color;
2291
box-shadow: none;
2292
}
2293
}
2294
2295
// Window Close button
2296
.header-bar .button.titlebutton,
2297
.titlebar .button.titlebutton {
2298
// @extend .button.flat;
2299
@extend %image_button;
2300
}
2301
2302
.header-bar.selection-mode .button.titlebutton,
2303
.titlebar.selection-mode .button.titlebutton {
2304
// &:backdrop { icon-shadow: none; }
2305
}
2306
2307
2308
// catch all extend :)
2309
2310
%selected_items {
2311
background-color: $selected_bg_color;
2312
color: $selected_fg_color;
2313
&:insensitive { color: $insensitive_selected_fg_color; }
2314
&:backdrop {
2315
// color: $backdrop_selected_fg_color;
2316
&:insensitive {
2317
color: $insensitive_selected_fg_color;
2318
}
2319
}
2320
}
2321
2322
.monospace {
2323
font: Monospace;
2324
}
2325
2326
/**********************
2327
* Touch Copy & Paste *
2328
*********************/
2329
2330
//touch selection handlebars for the Popover.osd above
2331
.entry.cursor-handle,
2332
.cursor-handle {
2333
background-color: $accent_bg_color;
2334
background-image: none;
2335
box-shadow: none;
2336
border-style: none;
2337
@each $s,$as in ('',''),
2338
(':hover','-hover'),
2339
(':active','-active') { //no need for insensitive and backdrop
2340
&.top#{$s}:dir(ltr), &.bottom#{$s}:dir(rtl) {
2341
$_url: 'assets/text-select-start#{$as}#{$asset_suffix}';
2342
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2343
url('#{$_url}@2.png'));
2344
padding-left: 10px;
2345
}
2346
&.bottom#{$s}:dir(ltr), &.top#{$s}:dir(rtl) {
2347
$_url: 'assets/text-select-end#{$as}#{$asset_suffix}';
2348
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2349
url('#{$_url}@2.png'));
2350
padding-right: 10px;
2351
}
2352
&.insertion-cursor#{$s}:dir(ltr), &.insertion-cursor#{$s}:dir(rtl) {
2353
$_url: 'assets/slider-horz-scale-has-marks-above#{$as}#{$asset_suffix}';
2354
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
2355
url('#{$_url}@2.png'));
2356
}
2357
}
2358
}
2359
2360
/* Decouple the font of context menus from their entry/textview */
2361
.context-menu {
2362
font: initial;
2363
}
2364
2365
.touch-selection {
2366
font: initial;
2367
color: $fg_color;
2368
background-color: $base_color;
2369
box-shadow: $z-depth-2;
2370
&:backdrop { box-shadow: $z-depth-1; }
2371
.button {
2372
}
2373
}
2374
2375
// This is used by GtkScrolledWindow, when content is touch-dragged past boundaries.
2376
// This draws a box on top of the content, the size changes programmatically.
2377
.overshoot {
2378
&.top {
2379
@include overshoot(top);
2380
}
2381
&.bottom {
2382
@include overshoot(bottom);
2383
}
2384
&.left {
2385
@include overshoot(left);
2386
}
2387
&.right {
2388
@include overshoot(right);
2389
}
2390
}
2391
2392
// Overflow indication, works similarly to the overshoot, the size if fixed tho.
2393
.undershoot {
2394
&.top {
2395
@include undershoot(top);
2396
}
2397
2398
&.bottom {
2399
@include undershoot(bottom);
2400
}
2401
2402
&.left {
2403
@include undershoot(left);
2404
}
2405
2406
&.right {
2407
@include undershoot(right);
2408
}
2409
}
2410