A fork of the Materia GTK theme.

Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

 _common.scss

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