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