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-3.20.scss

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