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