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