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-3.20.scss

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