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