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