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 • 79.25 kiB
ASCII text
        
            
1
* {
2
padding: 0;
3
background-clip: padding-box;
4
5
-GtkToolButton-icon-spacing: 4;
6
-GtkTextView-error-underline-color: $error_color;
7
8
// The size for scrollbars. The slider is 2px smaller, but we keep it
9
// up so that the whole area is sensitive to button presses for the
10
// slider. The stepper button is larger in both directions, the slider
11
// only in the width
12
13
-GtkScrolledWindow-scrollbar-spacing: 0;
14
15
-GtkToolItemGroup-expander-size: 11;
16
17
-GtkWidget-text-handle-width: 24;
18
-GtkWidget-text-handle-height: 24;
19
20
-GtkDialog-button-spacing: 4;
21
-GtkDialog-action-area-border: 0;
22
23
// We use the outline properties to signal the focus properties
24
// to the adwaita engine: using real CSS properties is faster,
25
// and we don't use any outlines for now.
26
27
outline-style: solid;
28
outline-width: 2px;
29
outline-color: $fill_color;
30
outline-offset: -4px;
31
-gtk-outline-radius: 2px;
32
33
-gtk-secondary-caret-color: $primary_color;
34
}
35
36
37
/***************
38
* Base States *
39
***************/
40
.background {
41
background-color: $bg_color;
42
color: $fg_color;
43
}
44
45
/*
46
These wildcard seems unavoidable, need to investigate.
47
Wildcards are bad and troublesome, use them with care,
48
or better, just don't.
49
Everytime a wildcard is used a kitten dies, painfully.
50
*/
51
52
*:disabled { -gtk-icon-effect: dim; }
53
54
.gtkstyle-fallback {
55
background-color: $bg_color;
56
color: $fg_color;
57
58
&:hover {
59
background-color: darken($bg_color, 5%);
60
color: $fg_color;
61
}
62
63
&:active {
64
background-color: darken($bg_color, 10%);
65
color: $fg_color;
66
}
67
68
&:disabled {
69
background-color: $bg_color;
70
color: $disabled_fg_color;
71
}
72
73
&:selected {
74
background-color: $primary_color;
75
color: $inverse_fg_color;
76
}
77
}
78
79
.view {
80
@extend row.activatable;
81
82
background-color: $base_color;
83
color: $fg_color;
84
85
&:disabled { color: $disabled_fg_color; }
86
87
selection,
88
&:selected { @extend %selected_items; }
89
}
90
91
textview {
92
// FIXME: we need to override background-color to ensure text rendering
93
text { background-color: $base_color; }
94
95
// FIXME: we cannot specify text color for the border node
96
border { background-color: $alt_base_color; }
97
}
98
99
iconview { border-radius: 2px; }
100
101
.rubberband,
102
rubberband {
103
border: 1px solid $alt_primary_color;
104
background-color: scale-alpha($alt_primary_color, $lower_opacity);
105
}
106
107
flowbox {
108
rubberband { @extend rubberband; }
109
110
flowboxchild {
111
padding: 4px;
112
border-radius: 2px;
113
outline-offset: -2px;
114
115
&:selected { @extend %selected_items; }
116
}
117
}
118
119
label {
120
caret-color: currentColor; // this shouldn't be needed.
121
122
&.separator {
123
@extend .dim-label;
124
125
color: $fg_color;
126
}
127
128
row:selected &,
129
&:selected { @extend %nobg_selected_items; }
130
131
selection {
132
background-color: $primary_color;
133
color: $inverse_fg_color;
134
}
135
136
&:disabled {
137
color: $disabled_fg_color;
138
139
selection { @extend %selected_items:disabled; }
140
141
tab &,
142
button & { color: inherit; }
143
}
144
}
145
146
.dim-label { opacity: $tertiary_opacity; }
147
148
assistant {
149
.sidebar {
150
padding: 4px 0;
151
// background-color: $base_color;
152
// border-top: 1px solid $border_color;
153
}
154
155
// &.csd .sidebar { border-top-style: none; }
156
157
.sidebar label {
158
min-height: $medium_size;
159
padding: 0 12px;
160
color: $tertiary_fg_color;
161
font-weight: 500;
162
163
&.highlight { color: $fg_color; }
164
}
165
}
166
167
%osd, .osd { opacity: $higher_opacity; }
168
169
170
/*********************
171
* Spinner Animation *
172
*********************/
173
@keyframes spin {
174
to { -gtk-icon-transform: rotate(1turn); }
175
}
176
177
@keyframes spin_colors {
178
1% { color: $info_bg_color; } 25% { color: $info_bg_color; }
179
26% { color: $question_bg_color; } 50% { color: $question_bg_color; }
180
51% { color: $warning_bg_color; } 75% { color: $warning_bg_color; }
181
76% { color: $error_bg_color; } 100% { color: $error_bg_color; }
182
}
183
184
spinner {
185
background: none;
186
opacity: 0; // non spinning spinner makes no sense
187
-gtk-icon-source: -gtk-icontheme('process-working-symbolic');
188
189
&:checked {
190
opacity: 1;
191
animation: spin 1s linear infinite, spin_colors 4s linear infinite;
192
193
&:disabled { opacity: $disabled_opacity; }
194
}
195
}
196
197
198
/****************
199
* Text Entries *
200
****************/
201
%entry,
202
entry {
203
%entry_basic, & {
204
min-height: $medium_size;
205
padding: 0 8px;
206
border-radius: 2px;
207
208
@include entry(normal);
209
210
&:focus { @include entry(focus); }
211
212
&:disabled { @include entry(disabled); }
213
214
&.flat {
215
border-radius: 0;
216
217
@include entry(flat-normal);
218
219
&:focus { @include entry(flat-focus); }
220
221
&:disabled { @include entry(flat-disabled); }
222
}
223
224
image { // icons inside the entry
225
// @extend %simple_flat_button;
226
227
// min-height: $small_size;
228
// min-width: $small_size;
229
// border-radius: $circular_radius;
230
// -gtk-outline-radius: $circular_radius;
231
color: gtkalpha(currentColor, $secondary_opacity);
232
233
&:hover, &:active { color: currentColor; }
234
235
&:disabled { color: gtkalpha(currentColor, $tertiary_opacity); }
236
237
&.left { margin-left: 2px; margin-right: 6px; }
238
239
&.right { margin-left: 6px; margin-right: 2px; }
240
}
241
242
undershoot {
243
&.left { @include undershoot(left); }
244
245
&.right { @include undershoot(right); }
246
}
247
248
selection { @extend %selected_items; }
249
250
// entry error and warning style
251
@each $e_type, $e_color in (error, $error_color),
252
(warning, $warning_color) {
253
&.#{$e_type} {
254
@include entry(normal, $e_color);
255
256
&:focus { @include entry(focus, $e_color); }
257
258
&:disabled { @include entry(disabled, $e_color); }
259
260
&.flat {
261
@include entry(flat-normal, $e_color);
262
263
&:focus { @include entry(flat-focus, $e_color); }
264
265
&:disabled { @include entry(flat-disabled, $e_color); }
266
}
267
}
268
}
269
270
&:drop(active) {
271
// box-shadow: inset 0 0 0 2px $accent_color;
272
}
273
274
.osd & {
275
}
276
}
277
278
progress {
279
margin: 2px (2px - 8px);
280
border-style: none none solid;
281
border-width: 2px;
282
border-color: $primary_color;
283
// border-radius: 0;
284
// box-shadow: none;
285
background-color: transparent;
286
// background-image: none;
287
}
288
289
// linked entries
290
.linked:not(.vertical) > & { @extend %linked; }
291
292
// Vertically linked entries
293
.linked.vertical > & { @extend %linked_vertical; }
294
295
.linked:not(.vertical) > &.flat,
296
.linked.vertical > &.flat { border-radius: 0; }
297
}
298
299
treeview entry {
300
&.flat, & {
301
min-height: 0;
302
padding: 2px;
303
border-radius: 0;
304
background-color: $base_color;
305
306
&, &:focus {
307
border-image: none;
308
box-shadow: none;
309
}
310
}
311
}
312
313
314
/***********
315
* Buttons *
316
***********/
317
// stuff for .needs-attention
318
@keyframes needs_attention {
319
from {
320
background-image: -gtk-gradient(radial,
321
center center, 0,
322
center center, 0.001,
323
to($accent_color),
324
to(transparent));
325
}
326
327
to {
328
background-image: -gtk-gradient(radial,
329
center center, 0,
330
center center, 0.5,
331
to($accent_color),
332
to(transparent));
333
}
334
}
335
336
%button,
337
button {
338
@at-root %button_basic, & {
339
min-height: 24px;
340
min-width: 16px;
341
padding: ($medium_size - 24px) / 2 ($medium_size - 16px) / 2;
342
border-radius: 2px;
343
font-weight: 500;
344
345
@include button(normal);
346
347
&:hover { @include button(hover); }
348
349
&:active { @include button(active); }
350
351
&:disabled { @include button(disabled); }
352
353
&:checked { @include button(checked); }
354
355
&:checked:disabled { @include button(checked-disabled); }
356
357
@at-root %flat_button, &.flat {
358
@at-root %simple_flat_button, & {
359
@include button(flat-normal);
360
361
&:hover { @include button(flat-hover); }
362
363
&:active { @include button(flat-active); }
364
365
&:disabled { @include button(flat-disabled); }
366
}
367
368
&:checked { @include button(flat-checked); }
369
370
&:checked:disabled { @include button(flat-checked-disabled); }
371
}
372
373
&.text-button {
374
padding-left: 16px;
375
padding-right: 16px;
376
}
377
378
&.image-button {
379
min-width: 24px;
380
padding: ($medium_size - 24px) / 2;
381
border-radius: $circular_radius;
382
-gtk-outline-radius: $circular_radius;
383
}
384
385
&.text-button.image-button {
386
border-radius: 2px;
387
-gtk-outline-radius: 2px;
388
389
label {
390
&:first-child {
391
margin-left: 16px - ($medium_size - 24px) / 2;
392
margin-right: 2px;
393
}
394
395
&:last-child {
396
margin-left: 2px;
397
margin-right: 16px - ($medium_size - 24px) / 2;
398
}
399
400
&:only-child {
401
margin-left: 16px - ($medium_size - 24px) / 2;
402
margin-right: 16px - ($medium_size - 24px) / 2;
403
}
404
}
405
406
image:not(:only-child) {
407
&:first-child { margin-left: (24px - 16px) / 2; }
408
409
&:last-child { margin-right: (24px - 16px) / 2; }
410
}
411
}
412
413
.linked > & { @extend %linked; }
414
415
.linked.vertical > & { @extend %linked_vertical; }
416
417
.linked > &.flat,
418
.linked.vertical > &.flat {
419
border-radius: 2px;
420
421
&.image-button {
422
border-radius: $circular_radius;
423
-gtk-outline-radius: $circular_radius;
424
}
425
426
&.text-button.image-button {
427
border-radius: 2px;
428
-gtk-outline-radius: 2px;
429
}
430
}
431
432
&:drop(active) {
433
// box-shadow: inset 0 0 0 2px $accent_color;
434
}
435
}
436
437
@at-root %button_selected, row:selected & {
438
&:disabled { color: $disabled_secondary_inverse_fg_color; }
439
}
440
441
// big standalone buttons like in Documents pager
442
&.osd {
443
padding: ($large_size - 24px) / 2 ($large_size - 16px) / 2;
444
445
&.image-button { padding: ($large_size - 24px) / 2; }
446
447
&:disabled { opacity: 0; }
448
}
449
450
// overlay / OSD style
451
@at-root %osd_button,
452
.osd & {
453
}
454
455
// Suggested and Destructive Action buttons
456
@each $b_type, $b_color in (suggested-action, $suggested_color),
457
(destructive-action, $destructive_color) {
458
&.#{$b_type} {
459
background-color: $b_color;
460
color: $inverse_fg_color;
461
462
&:disabled { @include button(disabled, $b_color); }
463
464
&:checked { background-color: mix($inverse_fg_color, $b_color, percentage($lower_opacity)); }
465
466
&.flat {
467
background-color: transparent;
468
color: $b_color;
469
470
&:disabled { @include button(flat-disabled, $b_color); }
471
472
&:checked { background-color: $fill_color; }
473
}
474
475
.osd & {
476
}
477
}
478
}
479
480
.stack-switcher > & {
481
// to position the needs attention dot, padding is added to the button
482
// child, a label needs just lateral padding while an icon needs vertical
483
// padding added too.
484
485
outline-offset: -4px; // needs to be set or it gets overriden by GtkRadioButton outline-offset
486
487
> label {
488
padding-left: 6px; // label padding
489
padding-right: 6px; //
490
}
491
492
> image {
493
padding-left: 6px; // image padding
494
padding-right: 6px; //
495
padding-top: 3px; //
496
padding-bottom: 3px; //
497
}
498
499
&.text-button {
500
// compensate text-button paddings
501
padding-left: 16px - 6px;
502
padding-right: 16px - 6px;
503
}
504
505
&.image-button {
506
// we want image buttons to have a 1:1 aspect ratio, so compensation
507
// of the padding added to the GtkImage is needed
508
padding-left: ($medium_size - 16px) / 2 - 6px;
509
padding-right: ($medium_size - 16px) / 2 - 6px;
510
}
511
512
&.needs-attention {
513
> label,
514
> image { @extend %needs_attention; }
515
516
&:checked {
517
> label,
518
> image {
519
animation: none;
520
background-image: none;
521
}
522
}
523
}
524
}
525
526
// hide separators
527
separator {
528
min-width: 0;
529
min-height: 0;
530
background-color: transparent;
531
}
532
533
// &.font,
534
// &.file { separator { background-color: transparent; }}
535
536
// &.font { > box > box > label { font-weight: bold; }}
537
538
// inline-toolbar buttons
539
.inline-toolbar & {
540
// @extend %button_basic.flat;
541
542
&:not(.text-button) { @extend %circular_button; }
543
}
544
545
.primary-toolbar & { -gtk-icon-shadow: none; } // tango icons don't need shadows
546
547
@at-root %circular_button,
548
&.close,
549
&.circular { // The Bloody Circul Button
550
border-radius: $circular_radius;
551
-gtk-outline-radius: $circular_radius;
552
553
// label { padding: 0; }
554
}
555
556
@at-root %small_button {
557
min-height: $small_size;
558
min-width: $small_size;
559
padding: 0;
560
border-radius: $circular_radius;
561
-gtk-outline-radius: $circular_radius;
562
}
563
}
564
565
%needs_attention {
566
animation: needs_attention $longer_duration $deceleration_curve forwards;
567
background-repeat: no-repeat;
568
background-position: right 3px;
569
background-size: 6px 6px;
570
571
&:dir(rtl) { background-position: left 3px; }
572
}
573
574
// all the following is for the +|- buttons on inline toolbars, that way
575
// should really be deprecated...
576
.inline-toolbar toolbutton > button { // redefining the button look is
577
// needed since those are flat...
578
}
579
580
// More inline toolbar buttons
581
toolbar.inline-toolbar toolbutton {
582
// > button.flat { @extend %linked_middle; }
583
584
// &:first-child > button.flat { @extend %linked:first-child; }
585
586
// &:last-child > button.flat { @extend %linked:last-child; }
587
588
// &:only-child > button.flat { @extend %linked:only-child; }
589
}
590
591
%linked_middle {
592
border-radius: 0;
593
-gtk-outline-radius: 2px;
594
}
595
596
%linked {
597
@extend %linked_middle;
598
599
&:first-child {
600
border-top-left-radius: 2px;
601
border-bottom-left-radius: 2px;
602
}
603
604
&:last-child {
605
border-top-right-radius: 2px;
606
border-bottom-right-radius: 2px;
607
}
608
609
&:only-child {
610
border-radius: 2px;
611
}
612
}
613
614
%linked_vertical_middle {
615
border-radius: 0;
616
-gtk-outline-radius: 2px;
617
}
618
619
%linked_vertical{
620
@extend %linked_vertical_middle;
621
622
&:first-child {
623
border-top-left-radius: 2px;
624
border-top-right-radius: 2px;
625
}
626
627
&:last-child {
628
border-bottom-left-radius: 2px;
629
border-bottom-right-radius: 2px;
630
}
631
632
&:only-child {
633
border-radius: 2px;
634
}
635
}
636
637
/* menu buttons */
638
modelbutton.flat,
639
.menuitem.button.flat {
640
min-height: $menuitem_size;
641
padding: 0 8px;
642
border-radius: 2px;
643
color: inherit;
644
645
@extend %simple_flat_button;
646
647
&:selected { @extend %selected_items; }
648
649
check,
650
radio {
651
box-shadow: none;
652
background-image: none;
653
654
&:not(:checked):not(:indeterminate) { color: gtkalpha(currentColor, $tertiary_opacity); }
655
656
&:last-child { margin-left: -8px; margin-right: -16px; }
657
658
&:first-child { margin-left: -16px; margin-right: -8px; }
659
}
660
661
check:not(:indeterminate):checked { @extend %check_checked; }
662
663
// radio:not(:indeterminate):checked { @extend %radio_checked; }
664
665
check:indeterminate:checked, radio:indeterminate:checked { @extend %indeterminate_checked; }
666
}
667
668
modelbutton.flat arrow {
669
background: none;
670
671
&:hover { background: none; }
672
673
&.left { -gtk-icon-source: -gtk-icontheme("pan-start-symbolic"); }
674
675
&.right { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
676
}
677
678
button.color {
679
min-height: $small_size;
680
min-width: $small_size;
681
padding: $container_padding;
682
683
colorswatch:only-child {
684
// &, overlay { border-radius: 0; }
685
}
686
}
687
688
689
/*********
690
* Links *
691
*********/
692
*:link {
693
&, &:hover, &:active { color: $link_color; }
694
695
&:visited {
696
&, &:hover, &:active { color: $visited_link_color; }
697
}
698
699
@at-root %link_selected,
700
&:selected,
701
*:selected & { color: $inverse_fg_color; }
702
}
703
704
button:link,
705
button:visited {
706
@extend *:link;
707
708
> label { text-decoration-line: underline; }
709
}
710
711
/*****************
712
* GtkSpinButton *
713
*****************/
714
spinbutton {
715
&:not(.vertical) {
716
// in this horizontal configuration, the whole spinbutton
717
// behaves as the entry, so we extend the entry styling
718
// and nuke the style on the internal entry
719
@extend %entry;
720
721
padding: 0;
722
723
%spinbutton_entry,
724
entry {
725
min-width: $large_size - 8px * 2;
726
// reset all the other props since the spinbutton node is styled here
727
margin: 0;
728
border-image: none;
729
border-radius: 0;
730
box-shadow: none;
731
background-color: transparent;
732
//
733
// This will help to simplify spinbutton's code, but unfortunatelly
734
// doesn't work properly in :dir(rtl). It needs z-index property.
735
//
736
// min-width: $large_size - 8px;
737
//
738
// $spinbuttons_width: $small_size * 2 + $container_padding * 3;
739
//
740
// &:dir(ltr) {
741
// margin-right: -$spinbuttons_width;
742
// padding-right: $spinbuttons_width;
743
// }
744
//
745
// &:dir(rtl) {
746
// margin-left: -$spinbuttons_width;
747
// padding-left: $spinbuttons_width;
748
// }
749
}
750
751
button {
752
// margin: $container_padding;
753
border: solid $container_padding transparent;
754
755
@extend %simple_flat_button;
756
757
@extend %small_button;
758
759
&.up:dir(ltr),
760
&.down:dir(rtl) { margin-left: -$container_padding / 2; }
761
762
&.up:dir(rtl),
763
&.down:dir(ltr) { margin-right: -$container_padding / 2; }
764
}
765
}
766
767
// OSD horizontal
768
.osd &:not(.vertical) {
769
button {
770
}
771
}
772
773
// Vertical
774
&.vertical {
775
// in the vertical configuration, we treat the spinbutton
776
// as a box, and tweak the style of the entry in the middle
777
// so that it's linked
778
779
// FIXME: this should not be set at all, but otherwise it gets the wrong
780
// color
781
&:disabled { color: $disabled_fg_color; }
782
783
&:drop(active) {
784
box-shadow: none;
785
}
786
787
entry {
788
min-height: $medium_size;
789
min-width: $large_size;
790
padding: 0;
791
}
792
793
button {
794
min-height: $medium_size;
795
min-width: $large_size;
796
padding: 0;
797
798
@extend %simple_flat_button;
799
800
&.up { border-radius: 2px 2px 0 0; }
801
802
&.down { border-radius: 0 0 2px 2px; }
803
}
804
}
805
806
// OSD vertical
807
.osd &.vertical button:first-child {
808
}
809
810
// Misc
811
treeview &:not(.vertical) {
812
min-height: 0;
813
border-style: none;
814
border-radius: 0;
815
816
entry {
817
min-height: 0;
818
padding: 1px 2px;
819
}
820
}
821
}
822
823
824
/**************
825
* ComboBoxes *
826
**************/
827
combobox {
828
arrow {
829
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
830
min-height: 16px;
831
min-width: 16px;
832
}
833
834
button.combo:checked { transition: none; } // workaround for menuitem selection
835
836
button.combo cellview {
837
&:dir(ltr) { margin-left: 8px - ($medium_size - 16px) / 2; }
838
&:dir(rtl) { margin-right: 8px - ($medium_size - 16px) / 2; }
839
}
840
841
#gtk-combobox-popup-menu {
842
padding: 2px 0;
843
844
menuitem {
845
min-height: $medium_size - 2px * 2;
846
padding: 0 8px;
847
}
848
}
849
850
&.linked {
851
button:nth-child(2) {
852
&:dir(ltr) { @extend %linked:last-child; }
853
&:dir(rtl) { @extend %linked:first-child; }
854
}
855
}
856
857
&:drop(active) { // FIXME: untested
858
box-shadow: none;
859
860
// button.combo { @extend %button_basic:drop(active); }
861
}
862
}
863
864
.linked > combobox > box > button.combo {
865
// the combo is a composite widget so the way we do button linking doesn't
866
// work, special case needed. See
867
// https://bugzilla.gnome.org/show_bug.cgi?id=733979
868
869
&:dir(ltr),
870
&:dir(rtl) { @extend %linked_middle; } // specificity bump
871
}
872
873
.linked:not(.vertical) > combobox:first-child > box > button.combo { @extend %linked:first-child; }
874
.linked:not(.vertical) > combobox:last-child > box > button.combo { @extend %linked:last-child; }
875
.linked:not(.vertical) > combobox:only-child > box > button.combo { @extend %linked:only-child; }
876
877
.linked.vertical > combobox > box > button.combo { @extend %linked_vertical_middle; }
878
.linked.vertical > combobox:first-child > box > button.combo { @extend %linked_vertical:first-child; }
879
.linked.vertical > combobox:last-child > box > button.combo { @extend %linked_vertical:last-child; }
880
.linked.vertical > combobox:only-child > box > button.combo { @extend %linked_vertical:only-child; }
881
882
%combo_flat {
883
border-radius: 0;
884
background-image: none;
885
font-weight: inherit;
886
887
@include entry(flat-normal);
888
889
&:hover { box-shadow: inset 0 -2px $fill_color; }
890
891
&:checked {
892
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
893
$primary_color 100%,
894
transparent 0%)
895
0 0 2 / 0 0 2px;
896
}
897
898
&:disabled { color: $disabled_fg_color; }
899
}
900
901
902
/************
903
* Toolbars *
904
************/
905
toolbar {
906
-GtkWidget-window-dragging: true;
907
padding: $container_padding / 2;
908
background-color: $bg_color;
909
910
button { @extend %button_basic.flat; }
911
912
// on OSD
913
.osd & { background-color: transparent; }
914
915
// stand-alone OSD toolbars
916
&.osd {
917
transition: $shadow_transition;
918
padding: $container_padding;
919
border-radius: 2px;
920
box-shadow: $shadow_2, inset 0 1px $highlight_color;
921
background-color: $base_color;
922
923
&:backdrop { box-shadow: $shadow_1, inset 0 1px $highlight_color; }
924
925
&.left,
926
&.right,
927
&.top,
928
&.bottom { border-radius: 0; } // positional classes for `attached` osd toolbars
929
}
930
931
// toolbar separators
932
&.horizontal separator { margin: $container_padding / 2; }
933
&.vertical separator { margin: $container_padding / 2; }
934
935
&:not(.inline-toolbar):not(.osd) {
936
scale,
937
entry,
938
spinbutton,
939
button { margin: $container_padding / 2; }
940
941
.linked entry,
942
.linked spinbutton,
943
.linked button {
944
&:not(:first-child) { margin-left: 0; }
945
&:not(:last-child) { margin-right: 0; }
946
}
947
948
switch { margin: ($container_padding / 2 + $container_padding) ($container_padding / 2); }
949
}
950
}
951
952
// searchbar, location-bar & inline-toolbar
953
.inline-toolbar {
954
padding: $container_padding;
955
border-style: solid;
956
border-width: 0 1px 1px;
957
border-color: $border_color;
958
background-color: $alt_base_color;
959
}
960
961
searchbar,
962
.location-bar {
963
padding: $container_padding;
964
border-style: solid;
965
border-width: 0 0 1px;
966
border-color: $border_color;
967
background-color: $bg_color;
968
background-clip: border-box;
969
}
970
971
972
/***************
973
* Header bars *
974
***************/
975
%titlebar,
976
headerbar {
977
transition: background-color $shorter_duration $deceleration_curve;
978
min-height: $large_size;
979
padding: 0 $container_padding;
980
box-shadow: $shadow_1, inset 0 1px $titlebar_highlight_color;
981
background-color: $titlebar_bg_color;
982
color: $titlebar_fg_color;
983
984
&:disabled :not(button) > label { color: $disabled_titlebar_fg_color; }
985
986
&:backdrop {
987
color: $secondary_titlebar_fg_color;
988
989
&:disabled :not(button) > label { color: $disabled_secondary_titlebar_fg_color; }
990
}
991
992
.title {
993
transition: $longer_transition;
994
padding: 0 12px;
995
font-weight: bold;
996
}
997
998
.subtitle {
999
transition: $longer_transition;
1000
padding: 0 12px;
1001
font-size: smaller;
1002
1003
@extend .dim-label;
1004
}
1005
1006
button:not(.suggested-action):not(.destructive-action) {
1007
@extend %button_basic.flat;
1008
1009
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1010
$titlebar_indicator_color 0%,
1011
transparent 0%)
1012
0 0 0 / 0 0 0px;
1013
1014
&:checked {
1015
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1016
$titlebar_indicator_color 100%,
1017
transparent 0%)
1018
0 0 2 / 0 0 2px;
1019
1020
&, &:disabled { background-color: transparent; }
1021
}
1022
}
1023
1024
button.suggested-action, button.destructive-action {
1025
&:disabled { color: gtkalpha(currentColor, $disabled_opacity); }
1026
}
1027
1028
&.selection-mode {
1029
// FIXME: 0.00001s is workaround for transition bug of gtk+ 3.22
1030
// see https://bugzilla.gnome.org/show_bug.cgi?id=774064
1031
transition: background-color 0.00001s $longer_duration;
1032
animation: header_ripple_effect $longer_duration $deceleration_curve;
1033
box-shadow: $shadow_1, inset 0 1px $alt_highlight_color;
1034
background-color: $primary_color;
1035
color: $inverse_fg_color;
1036
1037
&:backdrop {
1038
color: $secondary_inverse_fg_color;
1039
}
1040
1041
.subtitle:link { @extend *:link:selected; }
1042
1043
button:not(.suggested-action):not(.destructive-action) {
1044
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1045
currentColor 0%,
1046
transparent 0%)
1047
0 0 0 / 0 0 0px;
1048
color: currentColor;
1049
1050
&:disabled { color: gtkalpha(currentColor, $disabled_opacity); }
1051
1052
&:checked {
1053
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1054
currentColor 100%,
1055
transparent 0%)
1056
0 0 2 / 0 0 2px;
1057
color: currentColor;
1058
1059
&:disabled { color: gtkalpha(currentColor, $disabled_opacity); }
1060
}
1061
}
1062
1063
.selection-menu {
1064
padding-left: 16px;
1065
padding-right: 16px;
1066
1067
GtkArrow { -GtkArrow-arrow-scaling: 1; }
1068
1069
.arrow { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
1070
}
1071
}
1072
1073
.fullscreen &,
1074
.tiled &,
1075
.maximized & {
1076
border-radius: 0; // squared corners when the window is fullscreen, maximized or tiled
1077
box-shadow: $shadow_1;
1078
}
1079
1080
&.default-decoration {
1081
min-height: $small_size;
1082
padding: $container_padding;
1083
box-shadow: inset 0 1px $titlebar_highlight_color;
1084
1085
.fullscreen &,
1086
.tiled &,
1087
.maximized & { box-shadow: none; }
1088
1089
button.titlebutton {
1090
min-height: $small_size;
1091
min-width: $small_size;
1092
margin: 0;
1093
padding: 0;
1094
}
1095
1096
// workaround for non-animatable buttons
1097
.background:not(.csd) & button.titlebutton:active { background-size: 1000% 1000%; }
1098
}
1099
1100
.solid-csd & {
1101
&:dir(rtl), &:dir(ltr) { // specificity bump
1102
// margin-left: -2px;
1103
// margin-right: -2px;
1104
// margin-top: -2px;
1105
// border-radius: 0;
1106
// box-shadow: inset 0 1px $titlebar_highlight_color;
1107
}
1108
}
1109
}
1110
1111
headerbar {
1112
// add vertical margins to common widget on the headerbar to avoid them spanning the whole height
1113
entry,
1114
spinbutton,
1115
// separator,
1116
button {
1117
margin-top: $container_padding;
1118
margin-bottom: $container_padding;
1119
}
1120
1121
switch {
1122
margin-top: $container_padding * 2;
1123
margin-bottom: $container_padding * 2;
1124
}
1125
}
1126
1127
.background:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) .titlebar {
1128
border-top-left-radius: 2px;
1129
border-top-right-radius: 2px;
1130
}
1131
1132
headerbar { // headerbar border rounding
1133
window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) separator:first-child + &, // tackles the paned container case
1134
window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) &:first-child { border-top-left-radius: 2px; }
1135
1136
window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) &:last-child { border-top-right-radius: 2px; }
1137
1138
window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) stack & { // tackles the stacked headerbars case
1139
&:first-child, &:last-child {
1140
border-top-left-radius: 2px;
1141
border-top-right-radius: 2px;
1142
}
1143
}
1144
}
1145
1146
.titlebar:not(headerbar) {
1147
window.csd > & {
1148
// in csd we assume every titlebar is a headerbar so reset anything, this is needed for split toolbars cases
1149
padding: 0;
1150
background-color: transparent;
1151
background-image: none;
1152
border-style: none;
1153
box-shadow: none;
1154
}
1155
1156
> separator {
1157
background-color: $titlebar_bg_color;
1158
background-image: image($border_color);
1159
}
1160
1161
@extend %titlebar;
1162
}
1163
1164
1165
/************
1166
* Pathbars *
1167
************/
1168
%pathbar_button,
1169
.path-bar button {
1170
padding-left: ($medium_size - 24px) / 2;
1171
padding-right: ($medium_size - 24px) / 2;
1172
1173
label:not(:only-child) {
1174
&:first-child { margin-left: 4px; }
1175
1176
&:last-child { margin-right: 4px; }
1177
}
1178
1179
&.slider-button {
1180
padding-left: (24px - 16px) / 2;
1181
padding-right: (24px - 16px) / 2;
1182
}
1183
1184
:not(headerbar) & {
1185
@extend %flat_button;
1186
1187
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1188
$primary_color 0%,
1189
transparent 0%)
1190
0 0 0 / 0 0 0px;
1191
border-radius: 2px;
1192
1193
&:checked {
1194
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1195
$primary_color 100%,
1196
transparent 0%)
1197
0 0 2 / 0 0 2px;
1198
1199
&, &:disabled { background-color: transparent; }
1200
}
1201
}
1202
}
1203
1204
1205
/**************
1206
* Tree Views *
1207
**************/
1208
treeview.view {
1209
@at-root * {
1210
-GtkTreeView-horizontal-separator: 4;
1211
-GtkTreeView-grid-line-width: 1;
1212
-GtkTreeView-grid-line-pattern: '';
1213
-GtkTreeView-tree-line-width: 1;
1214
-GtkTreeView-tree-line-pattern: '';
1215
-GtkTreeView-expander-size: 16;
1216
}
1217
1218
border-left-color: $fill_color; // this is actually the tree lines color,
1219
border-top-color: $border_color; // while this is the grid lines color, better then nothing
1220
1221
rubberband { @extend rubberband; } // to avoid borders being overridden by the previously set props
1222
1223
&.separator {
1224
min-height: 1px + 2px * 2;
1225
color: $border_color;
1226
}
1227
1228
&:drop(active) {
1229
border-style: solid none;
1230
border-width: 1px;
1231
border-color: $accent_color;
1232
1233
&.after { border-top-style: none; }
1234
1235
&.before { border-bottom-style: none; }
1236
}
1237
1238
&.expander {
1239
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
1240
-gtk-icon-transform: rotate(-90deg);
1241
1242
&:dir(rtl) { -gtk-icon-transform: rotate(90deg); }
1243
1244
&:checked { -gtk-icon-transform: unset; }
1245
1246
color: $secondary_fg_color;
1247
1248
&:hover, &:active { color: $fg_color; }
1249
1250
&:disabled { color: $disabled_secondary_fg_color; }
1251
1252
&:selected {
1253
color: $secondary_inverse_fg_color;
1254
1255
&:hover, &:active { color: $inverse_fg_color; }
1256
1257
&:disabled { color: $disabled_secondary_inverse_fg_color; }
1258
}
1259
}
1260
1261
&.progressbar { // progress bar in treeviews
1262
border-style: none none solid;
1263
border-width: $bar_size;
1264
border-color: $primary_color;
1265
box-shadow: none;
1266
background-color: transparent;
1267
1268
&:selected { border-color: currentColor; }
1269
}
1270
1271
&.trough { // progress bar trough in treeviews
1272
border-style: none none solid;
1273
border-width: $bar_size;
1274
border-color: scale-alpha($primary_color, $lower_opacity);
1275
box-shadow: none;
1276
background-color: transparent;
1277
1278
&:selected { border-color: $fill_color; }
1279
}
1280
1281
header {
1282
button {
1283
@extend row.activatable;
1284
1285
padding: 2px 6px;
1286
border-style: none solid solid none;
1287
border-width: 1px;
1288
border-color: $border_color;
1289
border-radius: 0;
1290
background-clip: border-box;
1291
1292
&, &:hover, &:active { box-shadow: none; }
1293
1294
&, &:disabled { background-color: $base_color; }
1295
1296
&:last-child { border-right-style: none; }
1297
}
1298
}
1299
1300
button.dnd,
1301
header.button.dnd { // for treeview-like derive widgets
1302
padding: 2px 6px;
1303
border-style: none solid solid;
1304
border-width: 1px;
1305
border-color: $border_color;
1306
border-radius: 0;
1307
box-shadow: none;
1308
background-color: $base_color;
1309
background-clip: border-box;
1310
color: $primary_color;
1311
}
1312
1313
acceleditor > label { background-color: $primary_color; } // see tests/testaccel to test
1314
}
1315
1316
1317
/*********
1318
* Menus *
1319
*********/
1320
menubar,
1321
.menubar {
1322
-GtkWidget-window-dragging: true;
1323
padding: 0;
1324
// box-shadow: inset 0 -1px $border_color;
1325
background-color: $titlebar_bg_color;
1326
1327
> menuitem {
1328
transition: $shorter_transition;
1329
min-height: 20px;
1330
padding: 4px 8px;
1331
color: $secondary_titlebar_fg_color;
1332
1333
&:hover { // Seems like it :hover even with keyboard focus
1334
transition: none;
1335
background-color: $semi_fill_color;
1336
color: $titlebar_fg_color;
1337
}
1338
1339
&:disabled { color: $disabled_secondary_titlebar_fg_color; }
1340
}
1341
}
1342
1343
.csd.popup { border-radius: 2px; }
1344
1345
menu,
1346
.menu,
1347
.context-menu {
1348
margin: 4px 0;
1349
padding: 4px 0;
1350
box-shadow: inset 0 1px $highlight_color;
1351
background-color: $base_color;
1352
border: 1px solid $border_color; // adds borders in a non composited env
1353
1354
.csd & {
1355
border: none; // axes borders in a composited env
1356
border-radius: 2px;
1357
}
1358
1359
menuitem {
1360
transition: $shorter_transition;
1361
min-height: 20px;
1362
min-width: 40px;
1363
padding: 4px 8px;
1364
font: initial;
1365
text-shadow: none;
1366
1367
&:hover {
1368
transition: none;
1369
background-color: $semi_fill_color;
1370
}
1371
1372
&:disabled { color: $disabled_fg_color; }
1373
1374
// submenu indicators
1375
arrow {
1376
min-height: 16px;
1377
min-width: 16px;
1378
1379
&:dir(ltr) {
1380
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
1381
margin-left: 8px;
1382
}
1383
1384
&:dir(rtl) {
1385
-gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl');
1386
margin-right: 8px;
1387
}
1388
}
1389
1390
// avoids labels color being overridden, see
1391
// https://bugzilla.gnome.org/show_bug.cgi?id=767058
1392
label { &:dir(rtl), &:dir(ltr) { color: inherit; }}
1393
}
1394
1395
// overflow arrows
1396
> arrow {
1397
min-height: 16px;
1398
min-width: 16px;
1399
padding: 4px;
1400
border-radius: 0;
1401
background-color: $base_color;
1402
color: $secondary_fg_color;
1403
1404
&.top {
1405
margin-top: -4px;
1406
border-bottom: 1px solid $border_color;
1407
-gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
1408
}
1409
1410
&.bottom {
1411
margin-bottom: -4px;
1412
border-top: 1px solid $border_color;
1413
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
1414
}
1415
1416
&:hover {
1417
background-image: image($semi_fill_color);
1418
color: $fg_color;
1419
}
1420
1421
&:disabled {
1422
border-color: transparent;
1423
background-color: transparent;
1424
color: transparent;
1425
// color: $disabled_secondary_fg_color;
1426
}
1427
}
1428
1429
separator { margin: 4px 0; }
1430
}
1431
1432
menuitem {
1433
accelerator { color: gtkalpha(currentColor, $tertiary_opacity); }
1434
1435
check,
1436
radio {
1437
&:dir(ltr) { margin-right: -8px; margin-left: -16px; }
1438
&:dir(rtl) { margin-right: -16px; margin-left: -8px; }
1439
}
1440
}
1441
1442
// FIXME: THIS IS A REALLY UGLY WORKAROUND!
1443
// Electron/Atom render all translucent colors in opaque colors.
1444
// It's a very critical issue for this theme and should be fixed by upstream...
1445
.popup:not(.csd) menu {
1446
$opaque_fg_color: if($variant == 'light', mix($black, $base_color, percentage(0.8)), $white);
1447
$opaque_semi_fill_color: mix($opaque_fg_color, $base_color, percentage($lower_opacity / 2));
1448
$opaque_disabled_fg_color: mix($opaque_fg_color, $base_color, percentage($disabled_opacity));
1449
$opaque_tertiary_fg_color: mix($opaque_fg_color, $base_color, percentage($tertiary_opacity));
1450
1451
menuitem {
1452
color: $opaque_fg_color;
1453
1454
&:hover { background-color: $opaque_semi_fill_color; }
1455
1456
&:disabled { color: $opaque_disabled_fg_color; } // separator/border also use this color.
1457
}
1458
1459
// TODO: not working this, where/how i can set the accelerators?
1460
accelerator { color: $opaque_tertiary_fg_color; }
1461
}
1462
1463
1464
/************
1465
* Popovers *
1466
************/
1467
popover.background {
1468
transition: $shadow_transition;
1469
padding: 2px;
1470
box-shadow: $shadow_2; // TODO: this should really have a highlight
1471
background-color: $lighter_bg_color;
1472
1473
&:backdrop { box-shadow: $shadow_1; }
1474
1475
&, .csd & {
1476
border-style: solid;
1477
border-width: 1px;
1478
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.3);
1479
border-radius: 2px + 1px;
1480
}
1481
1482
> stack { margin: -4px; } // remove extra padding from menu style popovers
1483
1484
> toolbar { margin: -2px; }
1485
1486
> list,
1487
> .view,
1488
> toolbar {
1489
border-style: none;
1490
box-shadow: none;
1491
background-color: transparent;
1492
}
1493
1494
&.touch-selection,
1495
&.magnifier,
1496
&.osd { @extend %osd; }
1497
1498
// entry { @extend %entry.flat; }
1499
1500
// button.combo { @extend %combo_flat; }
1501
1502
// button:not(.suggested-action):not(.destructive-action) { @extend %button_basic.flat; }
1503
1504
&.menu button,
1505
button.model {
1506
@extend %simple_flat_button;
1507
1508
min-height: 32px;
1509
padding: 0 8px;
1510
border-radius: 2px;
1511
1512
&:checked { @extend %selected_items; }
1513
}
1514
1515
separator { margin: 4px 0; }
1516
1517
list separator { margin: 0; }
1518
}
1519
1520
/*************
1521
* Notebooks *
1522
*************/
1523
notebook {
1524
> header {
1525
border-width: 1px;
1526
border-color: $border_color;
1527
background-color: $bg_color;
1528
background-clip: border-box;
1529
1530
&.top {
1531
border-bottom-style: solid;
1532
> tabs {
1533
margin-bottom: -1px;
1534
> tab {
1535
1536
&:hover { box-shadow: inset 0 -2px $fill_color; }
1537
1538
&:checked { box-shadow: inset 0 -2px $primary_color; }
1539
}
1540
}
1541
}
1542
1543
&.bottom {
1544
border-top-style: solid;
1545
> tabs {
1546
margin-top: -1px;
1547
> tab {
1548
1549
&:hover { box-shadow: inset 0 2px $fill_color; }
1550
1551
&:checked { box-shadow: inset 0 2px $primary_color; }
1552
}
1553
}
1554
}
1555
1556
&.left {
1557
border-right-style: solid;
1558
> tabs {
1559
margin-right: -1px;
1560
> tab {
1561
1562
&:hover { box-shadow: inset -2px 0 $fill_color; }
1563
1564
&:checked { box-shadow: inset -2px 0 $primary_color; }
1565
}
1566
}
1567
}
1568
1569
&.right {
1570
border-left-style: solid;
1571
> tabs {
1572
margin-left: -1px;
1573
> tab {
1574
1575
&:hover { box-shadow: inset 2px 0 $fill_color; }
1576
1577
&:checked { box-shadow: inset 2px 0 $primary_color; }
1578
}
1579
}
1580
}
1581
1582
&.top > tabs > arrow {
1583
@extend %notebook_vert_arrows;
1584
1585
border-top-style: none;
1586
}
1587
1588
&.bottom > tabs > arrow {
1589
@extend %notebook_vert_arrows;
1590
1591
border-bottom-style: none;
1592
}
1593
1594
@at-root %notebook_vert_arrows {
1595
padding-left: 4px;
1596
padding-right: 4px;
1597
1598
&.down {
1599
margin-left: -8px;
1600
-gtk-icon-source: -gtk-icontheme('pan-start-symbolic');
1601
}
1602
1603
&.up {
1604
margin-right: -8px;
1605
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
1606
}
1607
}
1608
1609
&.left > tabs > arrow {
1610
@extend %notebook_horz_arrows;
1611
1612
border-left-style: none;
1613
}
1614
1615
&.right > tabs > arrow {
1616
@extend %notebook_horz_arrows;
1617
1618
border-right-style: none;
1619
}
1620
1621
@at-root %notebook_horz_arrows {
1622
padding-top: 4px;
1623
padding-bottom: 4px;
1624
1625
&.down {
1626
margin-top: -8px;
1627
-gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
1628
}
1629
1630
&.up {
1631
margin-bottom: -8px;
1632
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
1633
}
1634
}
1635
1636
> tabs > arrow {
1637
@extend %simple_flat_button;
1638
1639
min-height: 16px;
1640
min-width: 16px;
1641
border-radius: 0;
1642
}
1643
1644
tab {
1645
transition: $longer_transition,
1646
background-size 0,
1647
background-image 0;
1648
min-height: $small_size;
1649
min-width: $small_size;
1650
padding: $container_padding 12px;
1651
1652
outline-offset: -6px;
1653
1654
border-width: 1px; // for reorderable tabs
1655
border-color: transparent; //
1656
1657
background-image: radial-gradient(circle farthest-corner at center,
1658
$primary_color 10%,
1659
transparent 0%);
1660
background-repeat: no-repeat;
1661
background-position: center;
1662
background-size: 0% 0%;
1663
1664
color: $secondary_fg_color;
1665
font-weight: 500;
1666
1667
&:hover {
1668
color: $fg_color;
1669
1670
&.reorderable-page {
1671
border-color: $border_color;
1672
background-color: $alt_base_color;
1673
}
1674
}
1675
1676
&:disabled { color: $disabled_secondary_fg_color; }
1677
1678
&:checked {
1679
transition: $longer_transition,
1680
background-size $longer_duration $deceleration_curve,
1681
background-image $longer_duration + $ripple_duration $deceleration_curve;
1682
background-image: radial-gradient(circle farthest-corner at center,
1683
transparent 10%,
1684
transparent 0%);
1685
background-size: 1000% 1000%;
1686
color: $fg_color;
1687
1688
&:disabled { color: $disabled_fg_color; }
1689
1690
&.reorderable-page {
1691
border-color: $border_color;
1692
background-color: $base_color;
1693
}
1694
}
1695
1696
// colors the button like the label, overridden otherwise
1697
button.flat {
1698
@extend %small_button;
1699
1700
&:last-child {
1701
margin-left: $container_padding;
1702
margin-right: $container_padding - 12px;
1703
}
1704
1705
&:first-child {
1706
margin-left: $container_padding - 12px;
1707
margin-right: $container_padding;
1708
}
1709
}
1710
}
1711
1712
&.top,
1713
&.bottom {
1714
tabs {
1715
padding-left: 8px;
1716
padding-right: 8px;
1717
1718
&:not(:only-child) {
1719
&:first-child { margin-left: 0; }
1720
&:last-child { margin-right: 0; }
1721
}
1722
1723
tab {
1724
&.reorderable-page {
1725
margin: 0 -1px;
1726
border-style: none solid;
1727
}
1728
}
1729
}
1730
}
1731
1732
&.left,
1733
&.right {
1734
tabs {
1735
padding-top: 8px;
1736
padding-bottom: 8px;
1737
1738
&:not(:only-child) {
1739
&:first-child { margin-top: 0; }
1740
&:last-child { margin-bottom: 0; }
1741
}
1742
1743
tab {
1744
&.reorderable-page {
1745
margin: -1px 0;
1746
border-style: solid none;
1747
}
1748
}
1749
}
1750
}
1751
}
1752
1753
> stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks
1754
background-color: $base_color;
1755
1756
entry:not(.search),
1757
spinbutton:not(.vertical) { @extend %entry.flat; }
1758
1759
spinbutton:not(.vertical) entry { &, &:focus, &:disabled { @extend %spinbutton_entry; }}
1760
1761
button.combo { @extend %combo_flat; }
1762
}
1763
}
1764
1765
1766
/**************
1767
* Scrollbars *
1768
**************/
1769
scrollbar {
1770
$_slider_min_length: 24px;
1771
1772
// disable steppers
1773
@at-root * {
1774
-GtkScrollbar-has-backward-stepper: false;
1775
-GtkScrollbar-has-forward-stepper: false;
1776
}
1777
1778
transition: $longer_transition;
1779
background-color: $base_color;
1780
background-clip: $extra_background_clip;
1781
1782
// scrollbar border
1783
&.top { border-bottom: 1px solid $border_color; }
1784
&.bottom { border-top: 1px solid $border_color; }
1785
&.left { border-right: 1px solid $border_color; }
1786
&.right { border-left: 1px solid $border_color; }
1787
1788
// slider
1789
slider {
1790
transition: $shorter_transition, margin 0, border-width 0;
1791
min-width: 8px;
1792
min-height: 8px;
1793
border: 4px solid transparent;
1794
border-radius: $circular_radius;
1795
background-clip: padding-box;
1796
background-color: $tertiary_fg_color;
1797
1798
&:hover { background-color: $secondary_fg_color; }
1799
1800
&:active { background-color: $fg_color; }
1801
1802
&:disabled { background-color: $disabled_tertiary_fg_color; }
1803
}
1804
1805
&.fine-tune {
1806
slider {
1807
transition: $shorter_transition, margin 0, border-width 0, min-width 0, min-height 0;
1808
min-width: 4px;
1809
min-height: 4px;
1810
}
1811
1812
&.horizontal slider { margin: 2px 0; }
1813
1814
&.vertical slider { margin: 0 2px; }
1815
}
1816
1817
&.overlay-indicator {
1818
&:not(.dragging):not(.hovering) {
1819
border-color: transparent;
1820
background-color: transparent;
1821
1822
slider {
1823
min-width: 4px;
1824
min-height: 4px;
1825
margin: 4px - 1px;
1826
border: 1px solid scale-alpha($base_color, $lower_opacity);
1827
}
1828
1829
button {
1830
min-width: 4px;
1831
min-height: 4px;
1832
margin: 4px - 1px;
1833
border: 1px solid scale-alpha($base_color, $lower_opacity);
1834
border-radius: $circular_radius;
1835
background-color: $tertiary_fg_color;
1836
background-clip: padding-box;
1837
-gtk-icon-source: none;
1838
1839
&:disabled { background-color: $disabled_tertiary_fg_color; }
1840
}
1841
1842
&.horizontal {
1843
slider { min-width: $_slider_min_length; }
1844
1845
button { min-width: 8px; }
1846
}
1847
1848
&.vertical {
1849
slider { min-height: $_slider_min_length; }
1850
1851
button { min-height: 8px; }
1852
}
1853
}
1854
1855
&.dragging,
1856
&.hovering { background-color: scale-alpha($base_color, $higher_opacity); }
1857
}
1858
1859
&.horizontal slider { min-width: $_slider_min_length; }
1860
1861
&.vertical slider { min-height: $_slider_min_length; }
1862
1863
// button styling
1864
button {
1865
@extend %simple_flat_button;
1866
1867
min-width: 16px;
1868
min-height: 16px;
1869
padding: 0;
1870
border-radius: 0;
1871
}
1872
1873
// button icons
1874
&.vertical {
1875
button {
1876
&.down { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
1877
1878
&.up { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
1879
}
1880
}
1881
1882
&.horizontal {
1883
button {
1884
&.down { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
1885
1886
&.up { -gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); }
1887
}
1888
}
1889
}
1890
1891
1892
/**********
1893
* Switch *
1894
**********/
1895
switch {
1896
transition: $longer_transition;
1897
margin: $container_padding 0;
1898
border: 4px solid transparent;
1899
border-radius: $circular_radius;
1900
background-color: $fill_color;
1901
background-clip: padding-box;
1902
font-size: 0;
1903
1904
&:disabled { color: gtkalpha(currentColor, $disabled_opacity); }
1905
1906
&:checked {
1907
background-color: scale-alpha($accent_color, 0.5);
1908
1909
&:disabled {
1910
background-color: scale-alpha($accent_color, 0.5 * $disabled_opacity);
1911
color: $disabled_fg_color;
1912
}
1913
}
1914
1915
slider {
1916
@include entry(normal);
1917
1918
transition: $longer_transition, $shadow_transition, margin 0;
1919
min-width: $small_size;
1920
min-height: $small_size;
1921
margin: -4px 0 -4px -4px;
1922
border-radius: $circular_radius;
1923
-gtk-outline-radius: $circular_radius;
1924
}
1925
1926
&:hover slider { @include entry(focus); }
1927
1928
&:checked slider {
1929
transition: $longer_transition, $shadow_transition, margin 0, background-image 0, background-color 0.00001s $longer_duration;
1930
animation: needs_attention $longer_duration $deceleration_curve;
1931
margin: -4px -4px -4px 0;
1932
background-color: $accent_color;
1933
color: $inverse_fg_color;
1934
}
1935
1936
&:disabled slider { @include entry(disabled); }
1937
1938
&:checked:disabled slider { animation: none; }
1939
1940
row:selected & {
1941
}
1942
}
1943
1944
1945
/*************************
1946
* Check and Radio items *
1947
*************************/
1948
// draw regular check and radio items using our PNG assets
1949
// all assets are rendered from assets.svg. never add pngs directly
1950
1951
// selection-mode
1952
@each $s, $as in ('', '-unchecked'),
1953
(':checked', '-checked') {
1954
.view.content-view.check#{$s}:not(list) {
1955
margin: 8px;
1956
box-shadow: none;
1957
background-color: transparent;
1958
background-image: none;
1959
-gtk-icon-source: -gtk-scaled(url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}.png"),
1960
url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}@2.png"));
1961
-gtk-icon-shadow: $shadow_1;
1962
1963
&:hover, &:active { -gtk-icon-shadow: $shadow_2; }
1964
}
1965
}
1966
1967
checkbutton.text-button,
1968
radiobutton.text-button {
1969
// this is for a nice focus on check and radios text
1970
padding: 2px;
1971
outline-offset: 0;
1972
1973
label:not(:only-child) { margin: 0 4px; }
1974
}
1975
1976
check,
1977
radio {
1978
min-height: 24px;
1979
min-width: 24px;
1980
margin: -($large_size - 24px) / 2;
1981
padding: ($large_size - 24px) / 2;
1982
1983
@extend %simple_flat_button;
1984
1985
@extend %circular_button;
1986
1987
&:checked, &:indeterminate { color: $accent_color; }
1988
1989
&:checked:disabled, &:indeterminate:disabled { color: scale-alpha($accent_color, $disabled_opacity); }
1990
1991
// &:only-child { margin: -12px; }
1992
1993
row &:not(:checked):not(:indeterminate) {
1994
color: gtkalpha(currentColor, $secondary_opacity);
1995
1996
&:hover, &:active { color: currentColor; }
1997
1998
&:disabled { color: gtkalpha(currentColor, $secondary_opacity * $disabled_opacity); }
1999
}
2000
2001
menu menuitem & {
2002
transition: none;
2003
margin: -16px; // this is a workaround for a menu check/radio size allocation issue
2004
2005
&:not(:checked):not(:indeterminate) { color: gtkalpha(currentColor, $tertiary_opacity); }
2006
2007
&, &:hover, &:disabled {
2008
box-shadow: none;
2009
// color: inherit;
2010
// animation: none;
2011
}
2012
}
2013
}
2014
2015
%check,
2016
check {
2017
& { -gtk-icon-source: image(-gtk-recolor(url("assets/scalable/checkbox-unchecked-symbolic.svg")),
2018
-gtk-recolor(url("assets/scalable/checkbox-unchecked-symbolic.png"))); }
2019
2020
&:checked { -gtk-icon-source: image(-gtk-recolor(url("assets/scalable/checkbox-checked-symbolic.svg")),
2021
-gtk-recolor(url("assets/scalable/checkbox-checked-symbolic.png"))); }
2022
2023
&:indeterminate { -gtk-icon-source: image(-gtk-recolor(url("assets/scalable/checkbox-mixed-symbolic.svg")),
2024
-gtk-recolor(url("assets/scalable/checkbox-mixed-symbolic.png"))); }
2025
}
2026
2027
$radio_indicator: 10px / $large_size / 2;
2028
$radio_radius_slice: #{$large_size / 2px};
2029
$radio_radius_width: #{$large_size / 2};
2030
2031
%radio,
2032
radio {
2033
& { -gtk-icon-source: image(-gtk-recolor(url("assets/scalable/radio-unchecked-symbolic.svg")),
2034
-gtk-recolor(url("assets/scalable/radio-unchecked-symbolic.png"))); }
2035
2036
// &:checked { -gtk-icon-source: image(-gtk-recolor(url("assets/scalable/radio-checked-symbolic.svg")),
2037
// -gtk-recolor(url("assets/scalable/radio-checked-symbolic.png"))); }
2038
2039
&:indeterminate { -gtk-icon-source: image(-gtk-recolor(url("assets/scalable/radio-mixed-symbolic.svg")),
2040
-gtk-recolor(url("assets/scalable/radio-mixed-symbolic.png"))); }
2041
2042
border-image: -gtk-gradient(radial,
2043
center center, 0,
2044
center center, 0.001,
2045
to($accent_color),
2046
to(transparent))
2047
$radio_radius_slice / $radio_radius_width;
2048
2049
&:checked {
2050
border-image: -gtk-gradient(radial,
2051
center center, 0,
2052
center center, $radio_indicator,
2053
to($accent_color),
2054
to(transparent))
2055
$radio_radius_slice / $radio_radius_width;
2056
}
2057
2058
&:checked:disabled {
2059
border-image: -gtk-gradient(radial,
2060
center center, 0,
2061
center center, $radio_indicator,
2062
to(scale-alpha($accent_color, $disabled_opacity)),
2063
to(transparent))
2064
$radio_radius_slice / $radio_radius_width;
2065
}
2066
2067
&:indeterminate:checked {
2068
border-image: -gtk-gradient(radial,
2069
center center, 0,
2070
center center, 0.001,
2071
to($accent_color),
2072
to(transparent))
2073
$radio_radius_slice / $radio_radius_width;
2074
}
2075
}
2076
2077
// let's animate things
2078
@keyframes check_check {
2079
from { -gtk-icon-transform: rotate(90deg); }
2080
to { -gtk-icon-transform: unset; }
2081
}
2082
2083
@keyframes check_radio { // FIXME: cannot animate border-image
2084
from {
2085
border-image: -gtk-gradient(radial,
2086
center center, 0,
2087
center center, 0.001,
2088
to($accent_color),
2089
to(transparent))
2090
$radio_radius_slice / $radio_radius_width;
2091
}
2092
2093
to {
2094
border-image: -gtk-gradient(radial,
2095
center center, 0,
2096
center center, $radio_indicator,
2097
to($accent_color),
2098
to(transparent))
2099
$radio_radius_slice / $radio_radius_width;
2100
}
2101
}
2102
2103
@keyframes check_indeterminate {
2104
from { -gtk-icon-transform: unset; }
2105
50% { -gtk-icon-transform: scale(0, 1); }
2106
to { -gtk-icon-transform: unset; }
2107
}
2108
2109
%check_checked,
2110
check:not(:indeterminate):checked { animation: check_check $longer_duration $standard_curve; }
2111
2112
check:not(:indeterminate):checked:active { animation: check_check $longer_duration $standard_curve, ripple_effect $longer_duration $deceleration_curve forwards; }
2113
2114
// %radio_checked,
2115
// radio:not(:indeterminate):checked { animation: check_radio $longer_duration $standard_curve; }
2116
2117
// radio:not(:indeterminate):checked:active { animation: check_radio $longer_duration $standard_curve, ripple_effect $longer_duration $deceleration_curve forwards; }
2118
2119
%indeterminate_checked,
2120
check:indeterminate:checked, radio:indeterminate:checked { animation: check_indeterminate $longer_duration $standard_curve; }
2121
2122
check:indeterminate:checked:active, radio:indeterminate:checked:active { animation: check_indeterminate $longer_duration $standard_curve, ripple_effect $longer_duration $deceleration_curve forwards; }
2123
2124
// no animations in menus
2125
menu menuitem {
2126
check:not(:indeterminate):checked,
2127
radio:not(:indeterminate):checked,
2128
check:indeterminate:checked,
2129
radio:indeterminate:checked { animation: none; }
2130
}
2131
2132
treeview.view check,
2133
treeview.view radio {
2134
padding: 0;
2135
2136
&:hover {
2137
box-shadow: inset 0 0 0 9999px gtkalpha($fg_color, 0.05);
2138
2139
&:disabled { box-shadow: none; }
2140
2141
&:selected { box-shadow: inset 0 0 0 9999px gtkalpha($inverse_fg_color, 0.05); }
2142
}
2143
2144
& {
2145
color: $secondary_fg_color;
2146
2147
&:hover, &:active { color: $fg_color; }
2148
2149
&:disabled { color: $disabled_secondary_fg_color; }
2150
2151
&:checked, &:indeterminate { color: $accent_color; }
2152
2153
&:checked:disabled, &:indeterminate:disabled { color: scale-alpha($accent_color, $disabled_opacity); }
2154
}
2155
2156
&:selected {
2157
color: $secondary_inverse_fg_color;
2158
2159
&:hover, &:active { color: $inverse_fg_color; }
2160
2161
&:disabled { color: $disabled_secondary_inverse_fg_color; }
2162
2163
&:checked, &:indeterminate { color: $accent_color; }
2164
2165
&:checked:disabled, &:indeterminate:disabled { color: scale-alpha($accent_color, $disabled_opacity); }
2166
}
2167
}
2168
2169
treeview.view radio:checked {
2170
-gtk-icon-source: image(-gtk-recolor(url("assets/scalable/radio-checked-symbolic.svg")),
2171
-gtk-recolor(url("assets/scalable/radio-checked-symbolic.png")));
2172
border-image: none;
2173
}
2174
2175
2176
/************
2177
* GtkScale *
2178
************/
2179
scale {
2180
// sizing
2181
$_marks_lenght: 8px;
2182
$_marks_distance: 8px;
2183
2184
$slider_size: 24px;
2185
$marks_slider_size: 30px;
2186
2187
$slider_margin: -($slider_size - $bar_size) / 2;
2188
$marks_slider_margin: -($marks_slider_size - $bar_size) - $slider_margin;
2189
2190
$color_slider_margin: -($slider_size) / 2;
2191
$color_marks_slider_margin: -($marks_slider_size - 16px) - $color_slider_margin;
2192
2193
min-height: $medium_size - $slider_size;
2194
min-width: $medium_size - $slider_size;
2195
padding: ($slider_size / 2);
2196
2197
* { transition: $longer_transition; }
2198
2199
// the slider is inside the trough, so to have make it bigger there's a negative margin
2200
slider {
2201
min-height: $slider_size;
2202
min-width: $slider_size;
2203
margin: $slider_margin;
2204
}
2205
2206
// the backing bit
2207
trough {
2208
outline-offset: 2px;
2209
background-color: $fill_color;
2210
2211
&:disabled { color: $disabled_fg_color; }
2212
}
2213
2214
// the colored part of the backing bit
2215
highlight {
2216
background-color: $accent_color;
2217
2218
&:disabled { background-color: transparent; }
2219
}
2220
2221
// this is another differently styled part of the backing bit, the most relevant use case is for example
2222
// in media player to indicate how much video stream as been cached
2223
fill {
2224
background-color: $fill_color;
2225
2226
&:disabled { background-color: transparent; }
2227
}
2228
2229
slider {
2230
transition: all $shorter_duration $standard_curve;
2231
// border-radius: 100%;
2232
// background-color: $accent_color;
2233
background-repeat: no-repeat;
2234
background-position: center;
2235
2236
@each $s, $as in ('', ''),
2237
(':disabled', '-disabled') {
2238
&#{$s} {
2239
$_url: 'assets/scale-slider#{$as}#{$asset_suffix}';
2240
2241
background-image: -gtk-scaled(url('#{$_url}.png'), url('#{$_url}@2.png'));
2242
}
2243
}
2244
2245
background-size: calc(100% - 8px);
2246
2247
&:hover { background-size: calc(100% - 4px); }
2248
2249
&:active { background-size: calc(100% - 0px); }
2250
}
2251
2252
// click-and-hold the slider to activate
2253
&.fine-tune {
2254
// to make the slider shrink in fine-tune mode
2255
slider { background-size: calc(100% - 12px); }
2256
}
2257
2258
value { color: gtkalpha(currentColor, $tertiary_opacity); }
2259
2260
marks {
2261
color: $fill_color;
2262
2263
@each $marks_class, $marks_pos, $marks_margin in (top, top, bottom),
2264
(bottom, bottom, top),
2265
(top, left, right),
2266
(bottom, right, left) {
2267
&.#{$marks_class} {
2268
margin-#{$marks_margin}: $_marks_distance;
2269
margin-#{$marks_pos}: -($_marks_distance + $_marks_lenght);
2270
}
2271
}
2272
}
2273
2274
&.horizontal {
2275
indicator {
2276
min-height: $_marks_lenght;
2277
min-width: 1px;
2278
}
2279
}
2280
2281
&.vertical {
2282
indicator {
2283
min-height: 1px;
2284
min-width: $_marks_lenght;
2285
}
2286
}
2287
2288
// *WARNING* scale with marks madness following
2289
2290
@each $dir_class, $dir_infix in ('horizontal', 'horz'),
2291
('vertical', 'vert') {
2292
@each $marks_infix, $marks_class in ('marks-before', 'marks-before:not(.marks-after)'),
2293
('marks-after', 'marks-after:not(.marks-before)') {
2294
&.#{$dir_class}.#{$marks_class} {
2295
slider {
2296
@each $state, $state_infix in ('', ''),
2297
(':disabled', '-disabled') {
2298
&#{$state} {
2299
$_scale_asset: 'assets/scale-#{$dir_infix}-#{$marks_infix}-slider#{$state_infix}#{$asset_suffix}';
2300
2301
background-image: -gtk-scaled(url('#{$_scale_asset}.png'), url('#{$_scale_asset}@2.png'));
2302
}
2303
}
2304
2305
@if $dir_class == 'horizontal' {
2306
min-height: $marks_slider_size;
2307
min-width: $slider_size;
2308
2309
@if $marks_infix == 'marks-before' {
2310
margin-top: $marks_slider_margin;
2311
2312
background-position: center calc(100% - 4px);
2313
2314
&:hover { background-position: center calc(100% - 2px); }
2315
2316
&:active { background-position: center calc(100% - 0px); }
2317
}
2318
2319
@if $marks_infix == 'marks-after' {
2320
margin-bottom: $marks_slider_margin;
2321
2322
background-position: center calc(4px);
2323
2324
&:hover { background-position: center calc(2px); }
2325
2326
&:active { background-position: center calc(0px); }
2327
}
2328
}
2329
2330
@if $dir_class == 'vertical' {
2331
min-height: $slider_size;
2332
min-width: $marks_slider_size;
2333
2334
@if $marks_infix == 'marks-before' {
2335
margin-left: $marks_slider_margin;
2336
2337
background-position: calc(4px) center;
2338
2339
&:hover { background-position: calc(2px) center; }
2340
2341
&:active { background-position: calc(0px) center; }
2342
}
2343
2344
@if $marks_infix == 'marks-after' {
2345
margin-right: $marks_slider_margin;
2346
2347
background-position: calc(100% - 4px) center;
2348
2349
&:hover { background-position: calc(100% - 2px) center; }
2350
2351
&:active { background-position: calc(100% - 0px) center; }
2352
}
2353
}
2354
}
2355
2356
&.fine-tune slider {
2357
@if $dir_class == 'horizontal' {
2358
@if $marks_infix == 'marks-before' { background-position: center calc(100% - 6px); }
2359
2360
@if $marks_infix == 'marks-after' { background-position: center calc(6px); }
2361
}
2362
2363
@if $dir_class == 'vertical' {
2364
@if $marks_infix == 'marks-before' { background-position: calc(6px) center; }
2365
2366
@if $marks_infix == 'marks-after' { background-position: calc(100% - 6px) center; }
2367
}
2368
}
2369
}
2370
}
2371
}
2372
2373
&.color {
2374
min-height: 0;
2375
min-width: 0;
2376
2377
&.horizontal {
2378
padding: 0 0 12px 0;
2379
2380
slider {
2381
&:dir(ltr), &:dir(rtl) { // specificity bump
2382
margin-bottom: $color_slider_margin;
2383
margin-top: $color_marks_slider_margin;
2384
}
2385
}
2386
}
2387
2388
&.vertical {
2389
&:dir(ltr) {
2390
padding: 0 0 0 12px;
2391
2392
slider {
2393
margin-left: $color_slider_margin;
2394
margin-right: $color_marks_slider_margin;
2395
}
2396
}
2397
2398
&:dir(rtl) {
2399
padding: 0 12px 0 0;
2400
2401
slider {
2402
margin-right: $color_slider_margin;
2403
margin-left: $color_marks_slider_margin;
2404
}
2405
}
2406
}
2407
}
2408
}
2409
2410
2411
/*****************
2412
* Progress bars *
2413
*****************/
2414
progressbar {
2415
// sizing
2416
&.horizontal {
2417
trough,
2418
progress { min-height: $bar_size; }
2419
}
2420
2421
&.vertical {
2422
trough,
2423
progress { min-width: $bar_size; }
2424
}
2425
2426
// FIXME: insensitive state missing and some other state should be set probably
2427
color: $tertiary_fg_color;
2428
font-size: smaller;
2429
2430
trough { background-color: scale-alpha($primary_color, $lower_opacity); }
2431
2432
progress { background-color: $primary_color; }
2433
2434
&.osd { // progressbar.osd used for epiphany page loading progress
2435
// min-width: $bar_size;
2436
// min-height: $bar_size;
2437
// background-color: transparent;
2438
2439
// trough { background-color: transparent; }
2440
2441
progress {
2442
}
2443
}
2444
2445
trough.empty progress { all: unset; } // makes the progress indicator disappear, when the fraction is 0
2446
}
2447
2448
2449
/*************
2450
* Level Bar *
2451
*************/
2452
levelbar {
2453
block {
2454
min-width: $medium_size;
2455
min-height: $bar_size;
2456
}
2457
2458
&.vertical block {
2459
min-width: $bar_size;
2460
min-height: $medium_size;
2461
}
2462
2463
trough {
2464
padding: 2px;
2465
border-radius: 2px;
2466
2467
@include entry(normal);
2468
2469
&:disabled { @include entry(disabled); }
2470
}
2471
2472
&.horizontal.discrete block { margin: 0 1px; }
2473
2474
&.vertical.discrete block { margin: 1px 0; }
2475
2476
&.horizontal.discrete trough { padding: 2px 1px; }
2477
2478
&.vertical.discrete trough { padding: 1px 2px; }
2479
2480
block {
2481
&.low {
2482
background-color: $warning_color;
2483
}
2484
2485
&.high,
2486
&:not(.empty) {
2487
background-color: $primary_color;
2488
}
2489
2490
&.full {
2491
background-color: $success_color;
2492
}
2493
2494
&.empty {
2495
background-color: $fill_color;
2496
color: $disabled_fg_color;
2497
}
2498
}
2499
}
2500
2501
2502
/****************
2503
* Print dialog *
2504
*****************/
2505
printdialog {
2506
paper {
2507
padding: 0;
2508
border: 1px solid $border_color;
2509
background-color: $base_color;
2510
color: $fg_color;
2511
}
2512
2513
.dialog-action-box { margin: 12px; }
2514
}
2515
2516
2517
/**********
2518
* Frames *
2519
**********/
2520
frame > border,
2521
.frame {
2522
margin: 0;
2523
padding: 0;
2524
border: 1px solid $border_color;
2525
border-radius: 0;
2526
box-shadow: none;
2527
2528
&.flat { border-style: none; }
2529
}
2530
2531
frame.flat > border { @extend .frame.flat; }
2532
2533
actionbar > revealer > box {
2534
padding: $container_padding;
2535
border-top: 1px solid $border_color;
2536
2537
button:not(.suggested-action):not(.destructive-action):not(.server-list-button) { @extend %button_basic.flat; }
2538
}
2539
2540
scrolledwindow {
2541
viewport.frame { // avoid double borders when viewport inside scrolled window
2542
border-style: none;
2543
}
2544
2545
// This is used when content is touch-dragged past boundaries.
2546
// draws a box on top of the content, the size changes programmatically.
2547
@at-root overshoot {
2548
&.top { @include overshoot(top); }
2549
2550
&.bottom { @include overshoot(bottom); }
2551
2552
&.left { @include overshoot(left); }
2553
2554
&.right { @include overshoot(right); }
2555
}
2556
2557
// Overflow indication, works similarly to the overshoot, the size if fixed tho.
2558
@at-root undershoot {
2559
&.top { @include undershoot(top); }
2560
2561
&.bottom { @include undershoot(bottom); }
2562
2563
&.left { @include undershoot(left); }
2564
2565
&.right { @include undershoot(right); }
2566
}
2567
2568
@at-root junction { // the small square between two scrollbars
2569
border-style: solid none none solid;
2570
border-width: 1px;
2571
border-color: $border_color;
2572
background-color: $base_color;
2573
2574
&:dir(rtl) { border-style: solid solid none none; }
2575
}
2576
}
2577
2578
// vbox and hbox separators
2579
separator {
2580
min-width: 1px;
2581
min-height: 1px;
2582
background-color: $border_color;
2583
}
2584
2585
2586
/*********
2587
* Lists *
2588
*********/
2589
list {
2590
border-color: $border_color;
2591
background-color: $base_color;
2592
2593
row { padding: 2px; }
2594
}
2595
2596
// FIXME
2597
$row_transition: $longer_transition, background-color 0, color 0;
2598
2599
row {
2600
&.activatable {
2601
transition: $row_transition,
2602
background-size $ripple_duration $deceleration_curve,
2603
background-image $ripple_duration * 2 $deceleration_curve;
2604
box-shadow: inset 0 0 0 9999px transparent;
2605
background-image: radial-gradient(circle farthest-corner at center,
2606
transparent 10%,
2607
transparent 0%);
2608
background-repeat: no-repeat;
2609
background-position: center;
2610
background-size: 1000% 1000%;
2611
2612
&:hover {
2613
transition: $row_transition,
2614
box-shadow 0,
2615
background-size $ripple_duration $deceleration_curve,
2616
background-image $ripple_duration * 2 $deceleration_curve;
2617
box-shadow: inset 0 0 0 9999px $row_fill_color;
2618
}
2619
2620
&.has-open-popup, // this is for indicathing which row generated a popover see https://bugzilla.gnome.org/show_bug.cgi?id=754411
2621
&:active {
2622
transition: $row_transition,
2623
background-size 0,
2624
background-image 0;
2625
animation: ripple_effect $longer_duration $deceleration_curve forwards;
2626
box-shadow: inset 0 0 0 9999px $semi_fill_color;
2627
background-image: radial-gradient(circle farthest-corner at center,
2628
$semi_fill_color 10%,
2629
transparent 0%);
2630
background-size: 0% 0%;
2631
}
2632
}
2633
2634
&:selected { @extend %selected_items; }
2635
}
2636
2637
2638
/*********************
2639
* App Notifications *
2640
*********************/
2641
.app-notification {
2642
@extend %osd;
2643
2644
@extend toolbar.osd;
2645
2646
margin: 8px;
2647
2648
button { @extend %button_basic.flat; }
2649
2650
&.frame,
2651
border { border-style: none; }
2652
}
2653
2654
2655
/*************
2656
* Expanders *
2657
*************/
2658
expander {
2659
arrow {
2660
transition: all $shorter_duration $standard_curve;
2661
min-width: 16px;
2662
min-height: 16px;
2663
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
2664
-gtk-icon-transform: rotate(-90deg);
2665
2666
&:dir(rtl) { -gtk-icon-transform: rotate(90deg); }
2667
2668
&:checked { -gtk-icon-transform: unset; }
2669
2670
color: $secondary_fg_color;
2671
2672
&:hover, &:active { color: $fg_color; }
2673
2674
&:disabled { color: $disabled_secondary_fg_color; }
2675
2676
&:selected {
2677
color: $secondary_inverse_fg_color;
2678
2679
&:hover, &:active { color: $inverse_fg_color; }
2680
2681
&:disabled { color: $disabled_secondary_inverse_fg_color; }
2682
}
2683
}
2684
}
2685
2686
2687
/************
2688
* Calendar *
2689
***********/
2690
calendar {
2691
padding: 1px;
2692
border: 1px solid $border_color;
2693
color: $fg_color;
2694
2695
&:disabled { color: $disabled_fg_color; }
2696
2697
&:selected {
2698
@extend %selected_items;
2699
2700
border-radius: 2px + 1px;
2701
}
2702
2703
&.header {
2704
border-style: none none solid;
2705
border-radius: 0;
2706
}
2707
2708
&.button { @extend %simple_flat_button; }
2709
2710
&.highlight {
2711
color: gtkalpha(currentColor, $tertiary_opacity);
2712
font-weight: 500;
2713
}
2714
2715
&:indeterminate { color: gtkalpha(currentColor, $disabled_opacity); }
2716
}
2717
2718
2719
/***********
2720
* Dialogs *
2721
***********/
2722
messagedialog { // Message Dialog styling
2723
&.background { background-color: $lighter_bg_color; }
2724
2725
.titlebar {
2726
min-height: $small_size;
2727
border-style: none;
2728
box-shadow: inset 0 1px $highlight_color;
2729
background-color: $lighter_bg_color;
2730
color: $fg_color;
2731
2732
&:backdrop { color: $secondary_fg_color; }
2733
}
2734
2735
&.csd { // rounded bottom border styling for csd version
2736
&.background {
2737
// bigger radius for better antialiasing
2738
border-bottom-left-radius: 2px;
2739
border-bottom-right-radius: 2px;
2740
}
2741
2742
.dialog-action-area button {
2743
padding: 8px 16px;
2744
border-top: 1px solid $border_color;
2745
border-radius: 0;
2746
2747
@extend %simple_flat_button;
2748
2749
&:first-child { border-bottom-left-radius: 2px; }
2750
2751
&:last-child { border-bottom-right-radius: 2px; }
2752
}
2753
}
2754
}
2755
2756
filechooser {
2757
.dialog-action-box { border-top: 1px solid $border_color; }
2758
2759
#pathbarbox {
2760
border-bottom: 1px solid $border_color;
2761
background-color: $bg_color;
2762
}
2763
}
2764
2765
filechooserbutton:drop(active) {
2766
box-shadow: none;
2767
}
2768
2769
2770
/***********
2771
* Sidebar *
2772
***********/
2773
.sidebar {
2774
border-style: none;
2775
background-color: $lighter_bg_color;
2776
2777
@at-root %sidebar_left,
2778
&:dir(ltr),
2779
&.left,
2780
&.left:dir(rtl) {
2781
border-right: 1px solid $border_color;
2782
border-left-style: none;
2783
}
2784
2785
@at-root %sidebar_right,
2786
&:dir(rtl),
2787
&.right {
2788
border-left: 1px solid $border_color;
2789
border-right-style: none;
2790
}
2791
2792
list { background-color: transparent; }
2793
2794
paned & { &.left, &.right, &.left:dir(rtl), &:dir(rtl), &:dir(ltr), & { border-style: none; }}
2795
}
2796
2797
stacksidebar {
2798
&.sidebar {
2799
&:dir(ltr),
2800
&.left,
2801
&.left:dir(rtl) { list { @extend %sidebar_left; }}
2802
2803
&:dir(rtl),
2804
&.right { list { @extend %sidebar_right; }}
2805
}
2806
2807
row {
2808
padding: 10px 4px;
2809
2810
> label {
2811
padding-left: 6px;
2812
padding-right: 6px;
2813
}
2814
2815
&.needs-attention > label { @extend %needs_attention; }
2816
}
2817
}
2818
2819
2820
/****************
2821
* File chooser *
2822
****************/
2823
placessidebar {
2824
> viewport.frame { border-style: none; }
2825
2826
list { padding: (4px - 3px) 0 4px; }
2827
2828
row {
2829
// Needs overriding of the GtkListBoxRow padding
2830
min-height: 32px;
2831
margin: -1px 0; // Remove unknown margins
2832
padding: 0;
2833
2834
// Using margins/padding directly in the SidebarRow
2835
// will make the animation of the new bookmark row jump
2836
> revealer { padding: 0 12px; }
2837
2838
&:selected { color: $inverse_fg_color; }
2839
2840
&:disabled { color: $disabled_fg_color; }
2841
2842
image.sidebar-icon {
2843
opacity: $tertiary_opacity; // dim the device icons
2844
2845
&:dir(ltr) { padding-right: 8px; }
2846
&:dir(rtl) { padding-left: 8px; }
2847
}
2848
2849
label.sidebar-label {
2850
&:dir(ltr) { padding-right: 2px; }
2851
&:dir(rtl) { padding-left: 2px; }
2852
}
2853
2854
@at-root button.sidebar-button {
2855
@extend %simple_flat_button;
2856
2857
@extend %small_button;
2858
2859
row:selected & {
2860
}
2861
}
2862
2863
&.sidebar-placeholder-row {
2864
min-height: 2px;
2865
padding: 0 8px;
2866
background-image: image($accent_color);
2867
background-clip: content-box;
2868
}
2869
2870
&.sidebar-new-bookmark-row { color: $accent_color; }
2871
2872
&:drop(active):not(:disabled) {
2873
box-shadow: inset 0 0 0 2px $accent_color;
2874
2875
&:selected {
2876
// background-color: $accent_color;
2877
// color: $inverse_fg_color;
2878
}
2879
}
2880
}
2881
}
2882
2883
placesview {
2884
.server-list-button > image { -gtk-icon-transform: rotate(0turn); }
2885
2886
.server-list-button:checked > image { -gtk-icon-transform: rotate(-0.5turn); }
2887
2888
// this selects the "connect to server" label
2889
> actionbar > revealer > box > label {
2890
padding-left: 8px;
2891
padding-right: 8px;
2892
}
2893
}
2894
2895
2896
/*********
2897
* Paned *
2898
*********/
2899
paned {
2900
> separator {
2901
min-width: 1px;
2902
min-height: 1px;
2903
-gtk-icon-source: none; // defeats the ugly default handle decoration
2904
border-style: none; // just to be sure
2905
background-color: transparent;
2906
// workaround, using background istead of a border since the border will get rendered twice (?)
2907
background-image: image($border_color);
2908
background-size: 1px 1px;
2909
background-clip: content-box; // avoids borders image being rendered twice (?)
2910
2911
&.wide {
2912
min-width: 6px;
2913
min-height: 6px;
2914
background-color: $bg_color;
2915
background-image: image($border_color), image($border_color);
2916
background-size: 1px 1px, 1px 1px;
2917
}
2918
}
2919
2920
&.horizontal > separator {
2921
background-repeat: repeat-y;
2922
2923
&:dir(ltr) {
2924
margin: 0 -8px 0 0;
2925
padding: 0 8px 0 0;
2926
background-position: left;
2927
}
2928
2929
&:dir(rtl) {
2930
margin: 0 0 0 -8px;
2931
padding: 0 0 0 8px;
2932
background-position: right;
2933
}
2934
2935
&.wide {
2936
margin: 0;
2937
padding: 0;
2938
background-repeat: repeat-y, repeat-y;
2939
background-position: left, right;
2940
}
2941
}
2942
2943
&.vertical > separator {
2944
margin: 0 0 -8px 0;
2945
padding: 0 0 8px 0;
2946
background-repeat: repeat-x;
2947
background-position: top;
2948
2949
&.wide {
2950
margin: 0;
2951
padding: 0;
2952
background-repeat: repeat-x, repeat-x;
2953
background-position: bottom, top;
2954
}
2955
}
2956
}
2957
2958
2959
/**************
2960
* GtkInfoBar *
2961
**************/
2962
infobar {
2963
border-style: none;
2964
2965
&.info { background-color: $info_bg_color; }
2966
2967
&.question { background-color: $question_bg_color; }
2968
2969
&.warning { background-color: $warning_bg_color; }
2970
2971
&.error { background-color: $error_bg_color; }
2972
2973
&.info,
2974
&.question,
2975
&.warning,
2976
&.error {
2977
> label, & { color: $inverse_fg_color; }
2978
2979
button { @extend %button_selected; }
2980
2981
selection {}
2982
2983
*:link { @extend %link_selected; }
2984
}
2985
}
2986
2987
2988
/************
2989
* Tooltips *
2990
************/
2991
tooltip {
2992
&.background {
2993
// background-color needs to be set this way otherwise it gets drawn twice
2994
// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
2995
box-shadow: inset 0 1px $highlight_color;
2996
background-color: scale-alpha($base_color, $higher_opacity);
2997
}
2998
2999
// @extend %osd;
3000
3001
// padding: 4px; /* not working */
3002
border-radius: 2px;
3003
box-shadow: none; // otherwise it gets inherited by windowframe.csd
3004
3005
&:not(.csd) {
3006
border: 1px solid $border_color;
3007
border-radius: 2px + 1px;
3008
background-clip: $extra_background_clip;
3009
}
3010
3011
// FIXME: we need a border or tooltips vanish on black background.
3012
decoration { background-color: transparent; }
3013
3014
label {
3015
// tooltip label has already 6px margins
3016
min-height: 32px - 6px * 2;
3017
padding: 0 8px - 6px;
3018
}
3019
3020
* {
3021
// workaround for Eclipse.
3022
// do not include any declaration here.
3023
// padding: 0;
3024
// background-color: transparent;
3025
// color: inherit;
3026
}
3027
}
3028
3029
3030
/*****************
3031
* Color Chooser *
3032
*****************/
3033
colorswatch {
3034
// This widget is made of two boxes one on top of the other, the lower box is colorswatch {} the other one
3035
// is colorswatch overlay {}, colorswatch has the programmatically set background, so most of the style is
3036
// applied to the overlay box.
3037
3038
// base color corners rounding
3039
// to avoid the artifacts caused by rounded corner anti-aliasing the base color
3040
// sports a bigger radius.
3041
// nth-child is needed by the custom color strip.
3042
3043
&.top {
3044
border-top-left-radius: $material_radius + 0.5px;
3045
border-top-right-radius: $material_radius + 0.5px;
3046
3047
overlay {
3048
border-top-left-radius: $material_radius;
3049
border-top-right-radius: $material_radius;
3050
}
3051
}
3052
3053
&.bottom {
3054
border-bottom-left-radius: $material_radius + 0.5px;
3055
border-bottom-right-radius: $material_radius + 0.5px;
3056
3057
overlay {
3058
border-bottom-left-radius: $material_radius;
3059
border-bottom-right-radius: $material_radius;
3060
}
3061
}
3062
3063
&.left,
3064
&:first-child:not(.top) {
3065
border-top-left-radius: $material_radius + 0.5px;
3066
border-bottom-left-radius: $material_radius + 0.5px;
3067
3068
overlay {
3069
border-top-left-radius: $material_radius;
3070
border-bottom-left-radius: $material_radius;
3071
}
3072
}
3073
3074
&.right,
3075
&:last-child:not(.bottom) {
3076
border-top-right-radius: $material_radius + 0.5px;
3077
border-bottom-right-radius: $material_radius + 0.5px;
3078
3079
overlay {
3080
border-top-right-radius: $material_radius;
3081
border-bottom-right-radius: $material_radius;
3082
}
3083
}
3084
3085
&.dark overlay { color: $light_fg_color; }
3086
3087
&.light overlay { color: $dark_fg_color; }
3088
3089
&.dark { color: $light_fg_color; } // for focus ring
3090
3091
&.light { color: $dark_fg_color; } // for focus ring
3092
3093
&:drop(active) {
3094
box-shadow: none;
3095
3096
&.light overlay {
3097
box-shadow: $shadow_1, 0 0 0 2px $accent_color;
3098
}
3099
3100
&.dark overlay {
3101
box-shadow: $shadow_1, 0 0 0 2px $accent_color;
3102
}
3103
}
3104
3105
overlay {
3106
transition: $shadow_transition;
3107
box-shadow: $shadow_1;
3108
3109
&:hover { box-shadow: $shadow_2; }
3110
}
3111
3112
&#add-color-button {
3113
border-radius: $material_radius $material_radius 0 0;
3114
color: $light_fg_color; // for focus ring
3115
3116
&:only-child { border-radius: $material_radius; }
3117
3118
overlay {
3119
background-image: linear-gradient(to right,
3120
$error_bg_color 25%,
3121
$warning_bg_color 25%, $warning_bg_color 50%,
3122
$info_bg_color 50%, $info_bg_color 75%,
3123
$question_bg_color 75%);
3124
color: $light_fg_color;
3125
}
3126
}
3127
3128
&:disabled {
3129
opacity: $disabled_opacity;
3130
3131
overlay { box-shadow: none; }
3132
}
3133
3134
row:selected & {
3135
}
3136
3137
&#editor-color-sample {
3138
border-radius: $material_radius + 0.5px;
3139
3140
overlay { border-radius: $material_radius; }
3141
3142
// overlay:hover { box-shadow: $shadow_1; }
3143
}
3144
}
3145
3146
// colorscale popup
3147
colorchooser .popover.osd {
3148
transition: $shadow_transition;
3149
border-radius: 2px;
3150
box-shadow: $shadow_2, inset 0 1px $highlight_color;
3151
background-color: $base_color;
3152
3153
&:backdrop { box-shadow: $shadow_1, inset 0 1px $highlight_color; }
3154
3155
spinbutton:not(.vertical) { @extend %entry.flat; }
3156
}
3157
3158
3159
/********
3160
* Misc *
3161
********/
3162
// content view (grid/list)
3163
.content-view {
3164
background-color: $bg_color;
3165
3166
// &:hover { -gtk-icon-effect: highlight; }
3167
3168
rubberband, .rubberband { @extend rubberband; }
3169
}
3170
3171
.scale-popup {
3172
.osd & { @extend %osd; }
3173
3174
.osd & button.flat { // FIXME: quick hack, redo properly
3175
}
3176
3177
button { // +/- buttons on GtkVolumeButton popup
3178
}
3179
}
3180
3181
3182
/**********************
3183
* Window Decorations *
3184
*********************/
3185
decoration {
3186
transition: $shadow_transition;
3187
border-radius: 2px 2px 0 0;
3188
box-shadow: $shadow_4, 0 16px 16px transparent;
3189
3190
// FIXME rationalize shadows
3191
3192
// this is used for the resize cursor area
3193
margin: 8px;
3194
3195
&:backdrop {
3196
// the transparent shadow here is to enforce that the shadow extents don't
3197
// change when we go to backdrop, to prevent jumping windows.
3198
// The biggest shadow should be in the same order then in the active state
3199
// or the jumping will happen during the transition.
3200
box-shadow: $shadow_2, 0 16px 16px transparent;
3201
}
3202
3203
.maximized &,
3204
.fullscreen &,
3205
.tiled & { border-radius: 0; }
3206
3207
.popup & { box-shadow: none; }
3208
3209
// server-side decorations as used by mutter
3210
.ssd & { box-shadow: 0 3px 3px rgba(0, 0, 0, 0.16); } // just doing borders, wm draws actual shadows
3211
3212
.csd.popup & {
3213
border-radius: 2px;
3214
box-shadow: $shadow_2;
3215
}
3216
3217
tooltip.csd & {
3218
border-radius: 2px;
3219
box-shadow: $shadow_2;
3220
}
3221
3222
messagedialog.csd & {
3223
border-radius: 2px;
3224
// box-shadow: $shadow_4, 0 16px 16px transparent;
3225
3226
// &:backdrop { box-shadow: $shadow_2, 0 16px 16px transparent; }
3227
}
3228
3229
.solid-csd & {
3230
margin: 0;
3231
// padding: 4px;
3232
border-radius: 0;
3233
box-shadow: none;
3234
// box-shadow: inset 0 0 0 4px $titlebar_bg_color;
3235
background-color: $titlebar_bg_color;
3236
}
3237
}
3238
3239
// Window Close button
3240
button.titlebutton {
3241
// @extend %simple_flat_button;
3242
3243
@extend %circular_button;
3244
3245
.selection-mode & {
3246
}
3247
}
3248
3249
3250
// catch all extend :)
3251
3252
%selected_items {
3253
background-color: $primary_color;
3254
3255
@at-root %nobg_selected_items, & {
3256
color: $inverse_fg_color;
3257
3258
&:disabled { color: $disabled_inverse_fg_color; }
3259
}
3260
}
3261
3262
.monospace { font-family: monospace; }
3263
3264
3265
/**********************
3266
* Touch Copy & Paste *
3267
*********************/
3268
// touch selection handlebars for the Popover.osd above
3269
cursor-handle {
3270
border-radius: $circular_radius;
3271
background-color: $accent_color;
3272
background-image: none;
3273
3274
&.top:dir(ltr), &.bottom:dir(rtl) {
3275
padding-left: 6px;
3276
border-top-right-radius: 0;
3277
}
3278
3279
&.bottom:dir(ltr), &.top:dir(rtl) {
3280
padding-right: 6px;
3281
border-top-left-radius: 0;
3282
}
3283
3284
&.insertion-cursor:dir(ltr), &.insertion-cursor:dir(rtl) {
3285
-GtkWidget-text-handle-width: 24;
3286
-GtkWidget-text-handle-height: 30;
3287
3288
$_url: 'assets/scale-horz-marks-before-slider#{$asset_suffix}';
3289
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
3290
url('#{$_url}@2.png'));
3291
}
3292
}
3293
3294
.context-menu { font: initial; } // Decouple the font of context menus from their entry/textview
3295
3296
// shortcut window keys
3297
.keycap {
3298
min-width: 28px - 8px * 2;
3299
min-height: 28px - 2px;
3300
margin-top: 2px;
3301
padding-bottom: 2px;
3302
padding-left: 8px;
3303
padding-right: 8px;
3304
3305
border: solid 1px $border_color;
3306
border-radius: 2px + 1px;
3307
box-shadow: inset 0 -2px $border_color;
3308
background-color: $base_color;
3309
color: $fg_color;
3310
font-size: smaller;
3311
}
3312
3313
:not(decoration):not(window):drop(active) { // FIXME needs to be done widget by widget, this wildcard should really die
3314
transition: $longer_transition;
3315
box-shadow: $shadow_1, inset 0 0 0 2px $accent_color;
3316
caret-color: $accent_color;
3317
}
3318
3319
stackswitcher button.text-button { min-width: 100px; } // FIXME aggregate with buttons
3320
3321
stackswitcher button.circular,
3322
stackswitcher button.text-button.circular { // FIXME aggregate with buttons
3323
min-width: $medium_size;
3324
min-height: $medium_size;
3325
padding: 0;
3326
}
3327