A fork of the Materia GTK theme.

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 _common-3.20.scss

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