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