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.35 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
&:disabled accelerator { color: $disabled_secondary_fg_color; }
1587
}
1588
1589
// FIXME: THIS IS A REALLY UGLY WORKAROUND!
1590
// Electron/Atom render all translucent colors in opaque colors.
1591
// It's a very critical issue for this theme and should be fixed by upstream...
1592
.popup:not(.csd) menu {
1593
menuitem {
1594
color: $opaque_fg_color;
1595
1596
&:hover { background-color: $opaque_divider_color; }
1597
1598
&:disabled { color: $opaque_disabled_fg_color; } // separator/border also use this color.
1599
}
1600
1601
// FIXME: not working this
1602
accelerator { color: $opaque_secondary_fg_color; }
1603
}
1604
1605
1606
/************
1607
* Popovers *
1608
************/
1609
popover.background {
1610
transition: $shadow_transition;
1611
padding: 2px;
1612
box-shadow: $shadow_2; // TODO: this should really have a highlight
1613
background-color: $popup_bg_color;
1614
1615
&:backdrop { box-shadow: $shadow_1; }
1616
1617
&, .csd & {
1618
border-style: solid;
1619
border-width: 1px;
1620
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.3);
1621
border-radius: $material_radius + 1px;
1622
}
1623
1624
> stack { margin: -4px; } // remove extra padding from menu style popovers
1625
1626
> toolbar { margin: -2px; }
1627
1628
> list,
1629
> .view,
1630
> toolbar {
1631
border-style: none;
1632
box-shadow: none;
1633
background-color: transparent;
1634
}
1635
1636
// FIXME: Use the popover color instead of transparent as a workaround for .view
1637
list,
1638
.view:not(:selected),
1639
toolbar { background-color: $popup_bg_color; }
1640
1641
// &.touch-selection,
1642
// &.magnifier,
1643
// &.osd { @extend %osd; }
1644
1645
// entry { @extend %entry.flat; }
1646
1647
// button.combo { @extend %combo_flat; }
1648
1649
// button:not(.suggested-action):not(.destructive-action) { @extend %button_basic.flat; }
1650
1651
&.menu button,
1652
button.model {
1653
@extend %simple_flat_button;
1654
1655
min-height: 32px;
1656
padding: 0 8px;
1657
border-radius: $material_radius;
1658
1659
&:checked { @extend %selected_items; }
1660
}
1661
1662
separator { margin: 4px 0; }
1663
1664
list separator { margin: 0; }
1665
}
1666
1667
/*************
1668
* Notebooks *
1669
*************/
1670
notebook {
1671
frame > paned > & > header,
1672
&.frame > header { background-color: $alt_base_color; }
1673
1674
> header {
1675
border-width: 1px;
1676
border-color: $border_color;
1677
background-color: $bg_color;
1678
background-clip: border-box;
1679
1680
&.top {
1681
border-bottom-style: solid;
1682
1683
> tabs {
1684
margin-bottom: -1px;
1685
1686
> tab {
1687
box-shadow: inset 0 -2px transparent;
1688
1689
&:checked { box-shadow: inset 0 -2px $primary_color; }
1690
}
1691
}
1692
}
1693
1694
&.bottom {
1695
border-top-style: solid;
1696
1697
> tabs {
1698
margin-top: -1px;
1699
1700
> tab {
1701
box-shadow: inset 0 2px transparent;
1702
1703
&:checked { box-shadow: inset 0 2px $primary_color; }
1704
}
1705
}
1706
}
1707
1708
&.left {
1709
border-right-style: solid;
1710
1711
> tabs {
1712
margin-right: -1px;
1713
1714
> tab {
1715
box-shadow: inset -2px 0 transparent;
1716
1717
&:checked { box-shadow: inset -2px 0 $primary_color; }
1718
}
1719
}
1720
}
1721
1722
&.right {
1723
border-left-style: solid;
1724
1725
> tabs {
1726
margin-left: -1px;
1727
1728
> tab {
1729
box-shadow: inset 2px 0 transparent;
1730
1731
&:checked { box-shadow: inset 2px 0 $primary_color; }
1732
}
1733
}
1734
}
1735
1736
&.top > tabs > arrow {
1737
@extend %notebook_vert_arrows;
1738
1739
border-top-style: none;
1740
}
1741
1742
&.bottom > tabs > arrow {
1743
@extend %notebook_vert_arrows;
1744
1745
border-bottom-style: none;
1746
}
1747
1748
@at-root %notebook_vert_arrows {
1749
padding-left: 4px;
1750
padding-right: 4px;
1751
1752
&.down {
1753
margin-left: -8px;
1754
-gtk-icon-source: -gtk-icontheme('pan-start-symbolic');
1755
}
1756
1757
&.up {
1758
margin-right: -8px;
1759
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
1760
}
1761
}
1762
1763
&.left > tabs > arrow {
1764
@extend %notebook_horz_arrows;
1765
1766
border-left-style: none;
1767
}
1768
1769
&.right > tabs > arrow {
1770
@extend %notebook_horz_arrows;
1771
1772
border-right-style: none;
1773
}
1774
1775
@at-root %notebook_horz_arrows {
1776
padding-top: 4px;
1777
padding-bottom: 4px;
1778
1779
&.down {
1780
margin-top: -8px;
1781
-gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
1782
}
1783
1784
&.up {
1785
margin-bottom: -8px;
1786
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
1787
}
1788
}
1789
1790
> tabs > arrow {
1791
@extend %simple_flat_button;
1792
1793
min-height: 16px;
1794
min-width: 16px;
1795
border-radius: 0;
1796
}
1797
1798
tab {
1799
transition: $shorter_transition,
1800
background-size 0,
1801
background-image 0;
1802
min-height: $small_size;
1803
min-width: $small_size;
1804
padding: $container_padding 12px;
1805
1806
outline-offset: -6px;
1807
1808
border-width: 1px; // for reorderable tabs
1809
border-color: transparent; //
1810
1811
background-image: radial-gradient(circle farthest-corner at center,
1812
$primary_color 10%,
1813
transparent 0%);
1814
background-repeat: no-repeat;
1815
background-position: center;
1816
background-size: 0% 0%;
1817
background-clip: border-box;
1818
1819
color: $secondary_fg_color;
1820
font-weight: 500;
1821
1822
&:hover {
1823
background-color: $hover_bg_color;
1824
color: $fg_color;
1825
}
1826
1827
&:disabled { color: $disabled_secondary_fg_color; }
1828
1829
&:checked {
1830
transition: $shorter_transition,
1831
background-size $longer_duration $deceleration_curve,
1832
background-image $longer_duration + $ripple_duration $deceleration_curve;
1833
background-color: transparent;
1834
background-image: radial-gradient(circle farthest-corner at center,
1835
transparent 10%,
1836
transparent 0%);
1837
background-size: 1000% 1000%;
1838
background-clip: padding-box;
1839
color: $fg_color;
1840
1841
&:disabled { color: $disabled_fg_color; }
1842
1843
&.reorderable-page {
1844
border-color: $border_color;
1845
background-color: $base_color;
1846
}
1847
}
1848
1849
// colors the button like the label, overridden otherwise
1850
button.flat {
1851
@extend %small_button;
1852
1853
&:last-child {
1854
margin-left: $container_padding;
1855
margin-right: $container_padding - 12px;
1856
}
1857
1858
&:first-child {
1859
margin-left: $container_padding - 12px;
1860
margin-right: $container_padding;
1861
}
1862
}
1863
}
1864
1865
&.top,
1866
&.bottom {
1867
tabs {
1868
padding-left: 8px;
1869
padding-right: 8px;
1870
1871
&:not(:only-child) {
1872
&:first-child { margin-left: 0; }
1873
1874
&:last-child { margin-right: 0; }
1875
}
1876
1877
tab.reorderable-page { border-style: none solid; }
1878
}
1879
}
1880
1881
&.left,
1882
&.right {
1883
tabs {
1884
padding-top: 8px;
1885
padding-bottom: 8px;
1886
1887
&:not(:only-child) {
1888
&:first-child { margin-top: 0; }
1889
1890
&:last-child { margin-bottom: 0; }
1891
}
1892
1893
tab.reorderable-page { border-style: solid none; }
1894
}
1895
}
1896
}
1897
1898
> stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks
1899
background-color: $base_color;
1900
1901
entry:not(.search),
1902
spinbutton:not(.vertical) { @extend %entry.flat; }
1903
1904
spinbutton:not(.vertical) entry { &, &:focus, &:disabled { @extend %spinbutton_entry; }}
1905
1906
treeview entry:not(.search),
1907
treeview spinbutton:not(.vertical) { @extend %treeview_entry; }
1908
1909
button.combo { @extend %combo_flat; }
1910
}
1911
}
1912
1913
1914
/**************
1915
* Scrollbars *
1916
**************/
1917
scrollbar {
1918
$_slider_min_length: 24px;
1919
1920
// disable steppers
1921
@at-root * {
1922
-GtkScrollbar-has-backward-stepper: false;
1923
-GtkScrollbar-has-forward-stepper: false;
1924
}
1925
1926
transition: $shorter_transition;
1927
background-color: $base_color;
1928
background-clip: $extra_background_clip;
1929
1930
// scrollbar border
1931
&.top { border-bottom: 1px solid $border_color; }
1932
&.bottom { border-top: 1px solid $border_color; }
1933
&.left { border-right: 1px solid $border_color; }
1934
&.right { border-left: 1px solid $border_color; }
1935
1936
// slider
1937
slider {
1938
transition: $shorter_transition, margin 0, border-width 0;
1939
min-width: 8px;
1940
min-height: 8px;
1941
border: 4px solid transparent;
1942
border-radius: $circular_radius;
1943
background-clip: padding-box;
1944
background-color: $hint_fg_color;
1945
1946
&:hover { background-color: $secondary_fg_color; }
1947
1948
&:active { background-color: $fg_color; }
1949
1950
&:disabled { background-color: $disabled_secondary_fg_color; }
1951
}
1952
1953
&.fine-tune {
1954
slider {
1955
transition: $shorter_transition, margin 0, border-width 0, min-width 0, min-height 0;
1956
min-width: 4px;
1957
min-height: 4px;
1958
}
1959
1960
&.horizontal slider { margin: 2px 0; }
1961
1962
&.vertical slider { margin: 0 2px; }
1963
}
1964
1965
&.overlay-indicator {
1966
&:not(.dragging):not(.hovering) {
1967
border-color: transparent;
1968
background-color: transparent;
1969
1970
slider {
1971
min-width: 4px;
1972
min-height: 4px;
1973
margin: 4px - 1px;
1974
border: 1px solid rgba($base_color, 0.3);
1975
}
1976
1977
button {
1978
min-width: 4px;
1979
min-height: 4px;
1980
margin: 4px - 1px;
1981
border: 1px solid rgba($base_color, 0.3);
1982
border-radius: $circular_radius;
1983
background-color: $hint_fg_color;
1984
background-clip: padding-box;
1985
-gtk-icon-source: none;
1986
1987
&:disabled { background-color: $disabled_secondary_fg_color; }
1988
}
1989
1990
&.horizontal {
1991
slider { min-width: $_slider_min_length; }
1992
1993
button { min-width: 8px; }
1994
}
1995
1996
&.vertical {
1997
slider { min-height: $_slider_min_length; }
1998
1999
button { min-height: 8px; }
2000
}
2001
}
2002
2003
&.dragging,
2004
&.hovering { background-color: rgba($base_color, 0.9); }
2005
}
2006
2007
&.horizontal slider { min-width: $_slider_min_length; }
2008
2009
&.vertical slider { min-height: $_slider_min_length; }
2010
2011
// button styling
2012
button {
2013
@extend %simple_flat_button;
2014
2015
min-width: 16px;
2016
min-height: 16px;
2017
padding: 0;
2018
border-radius: 0;
2019
}
2020
2021
// button icons
2022
&.vertical {
2023
button {
2024
&.down { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
2025
2026
&.up { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
2027
}
2028
}
2029
2030
&.horizontal {
2031
button {
2032
&.down { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
2033
2034
&.up { -gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); }
2035
}
2036
}
2037
}
2038
2039
2040
/**********
2041
* Switch *
2042
**********/
2043
switch {
2044
transition: all $shorter_duration $deceleration_curve;
2045
margin: $container_padding 0;
2046
padding: 0 2px;
2047
border: 5px solid transparent;
2048
border-radius: $circular_radius;
2049
background-color: $track_color;
2050
background-clip: padding-box;
2051
font-size: 0;
2052
2053
&:checked { background-color: rgba($secondary_color, 0.5); }
2054
2055
&:disabled { opacity: 0.5; }
2056
2057
slider {
2058
transition: all $shorter_duration $deceleration_curve;
2059
min-width: 20px;
2060
min-height: 20px;
2061
margin: -3px -2px;
2062
border-radius: $circular_radius;
2063
box-shadow: 0 0 0 10px transparent, $shadow_1;
2064
background-color: $popup_bg_color;
2065
}
2066
2067
&:hover slider { box-shadow: 0 0 0 10px $hover_bg_color, $shadow_1; }
2068
2069
&:focus slider { box-shadow: 0 0 0 10px $focus_bg_color, $shadow_1; }
2070
2071
&:focus:hover slider { box-shadow: 0 0 0 10px $hover_focus_bg_color, $shadow_1; }
2072
2073
&:checked slider {
2074
background-color: $secondary_color;
2075
color: $secondary_color;
2076
}
2077
2078
row:selected & {
2079
}
2080
}
2081
2082
2083
/*************************
2084
* Check and Radio items *
2085
*************************/
2086
// draw regular check and radio items using our PNG assets
2087
// all assets are rendered from assets.svg. never add pngs directly
2088
2089
// selection-mode
2090
.view.content-view.check:not(list),
2091
.content-view .tile check:not(list) {
2092
min-height: 40px;
2093
min-width: 40px;
2094
margin: 0;
2095
padding: 0;
2096
box-shadow: none;
2097
background-color: transparent;
2098
background-image: none;
2099
-gtk-icon-shadow: $shadow_1;
2100
2101
&:hover, &:active { -gtk-icon-shadow: $shadow_2; }
2102
2103
@each $s, $as in ('', '-unchecked'),
2104
(':checked', '-checked') {
2105
&#{$s} {
2106
-gtk-icon-source: -gtk-scaled(url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}.png"),
2107
url("assets/selectionmode-checkbox#{$as}#{$asset_suffix}@2.png"));
2108
}
2109
}
2110
}
2111
2112
checkbutton,
2113
radiobutton {
2114
outline: none;
2115
}
2116
2117
checkbutton.text-button,
2118
radiobutton.text-button {
2119
// this is for a nice focus on check and radios text
2120
padding: 2px;
2121
2122
label:not(:only-child) { margin: 0 4px; }
2123
}
2124
2125
$check_radio_size: 40px;
2126
2127
check,
2128
radio {
2129
min-height: 24px;
2130
min-width: 24px;
2131
margin: -($check_radio_size - 24px) / 2;
2132
padding: ($check_radio_size - 24px) / 2;
2133
2134
@extend %simple_flat_button;
2135
2136
@extend %circular_button;
2137
2138
&:hover { box-shadow: inset 0 0 0 9999px $hover_bg_color; }
2139
2140
&:focus { box-shadow: inset 0 0 0 9999px $focus_bg_color; }
2141
2142
&:focus:hover { box-shadow: inset 0 0 0 9999px $hover_focus_bg_color; }
2143
2144
&:checked, &:indeterminate {
2145
color: $secondary_color;
2146
2147
&:disabled { color: $disabled_secondary_color; }
2148
}
2149
2150
// &:only-child { margin: -12px; }
2151
2152
row:selected &:not(:checked):not(:indeterminate) {
2153
color: $inverse_secondary_fg_color;
2154
2155
&:hover, &:active { color: $inverse_fg_color; }
2156
2157
&:disabled { color: $inverse_disabled_secondary_fg_color; }
2158
}
2159
2160
popover & {
2161
&, &:hover, &:focus, &:focus:hover, &:active, &:disabled {
2162
transition: none; // FIXME: this is a workaround for a popover check/radio long transition issue
2163
box-shadow: none;
2164
background-image: none;
2165
}
2166
2167
&:not(:checked):not(:indeterminate):not(:disabled) { color: $secondary_fg_color; }
2168
2169
&.left:dir(rtl) {
2170
margin-left: -12px;
2171
margin-right: -4px;
2172
}
2173
2174
&.right:dir(ltr) {
2175
margin-left: -4px;
2176
margin-right: -12px;
2177
}
2178
}
2179
2180
menu menuitem & {
2181
transition: none;
2182
margin: 0; // this is a workaround for a menu check/radio size allocation issue
2183
padding: 0;
2184
2185
&:dir(ltr) { margin-right: 8px; }
2186
2187
&:dir(rtl) { margin-left: 8px; }
2188
2189
&:not(:checked):not(:indeterminate):not(:disabled) { color: $secondary_fg_color; }
2190
2191
&, &:hover, &:disabled {
2192
box-shadow: none;
2193
// color: inherit;
2194
}
2195
}
2196
}
2197
2198
%check,
2199
check {
2200
-gtk-icon-source: -gtk-recolor(url("assets/scalable/checkbox-unchecked-symbolic.svg"));
2201
2202
&:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/checkbox-checked-symbolic.svg")); }
2203
2204
&:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/checkbox-mixed-symbolic.svg")); }
2205
}
2206
2207
%radio,
2208
radio {
2209
-gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-unchecked-symbolic.svg"));
2210
2211
// &:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-checked-symbolic.svg")); }
2212
2213
&:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-mixed-symbolic.svg")); }
2214
2215
border-image-slice: $check_radio_size / 2px;
2216
border-image-width: $check_radio_size / 2;
2217
2218
$radio_indicator: 10px / $check_radio_size / 2;
2219
2220
& {
2221
border-image-source: -gtk-gradient(radial,
2222
center center, 0,
2223
center center, 0.001,
2224
to($secondary_color),
2225
to(transparent));
2226
}
2227
2228
&:checked:not(:indeterminate) {
2229
border-image-source: -gtk-gradient(radial,
2230
center center, 0,
2231
center center, $radio_indicator,
2232
to($secondary_color),
2233
to(transparent));
2234
}
2235
2236
&:checked:not(:indeterminate):disabled {
2237
border-image-source: -gtk-gradient(radial,
2238
center center, 0,
2239
center center, $radio_indicator,
2240
to($disabled_secondary_color),
2241
to(transparent));
2242
}
2243
}
2244
2245
%small_check,
2246
menu menuitem check {
2247
& {
2248
min-height: 16px;
2249
min-width: 16px;
2250
border-radius: $material_radius;
2251
-gtk-outline-radius: $material_radius;
2252
-gtk-icon-source: -gtk-recolor(url("assets/scalable/small-checkbox-unchecked-symbolic.svg"));
2253
}
2254
2255
&:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/small-checkbox-checked-symbolic.svg")); }
2256
2257
&:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/small-checkbox-mixed-symbolic.svg")); }
2258
}
2259
2260
%small_radio,
2261
menu menuitem radio {
2262
& {
2263
min-height: 16px;
2264
min-width: 16px;
2265
border-image: none;
2266
-gtk-icon-source: -gtk-recolor(url("assets/scalable/small-radio-unchecked-symbolic.svg"));
2267
}
2268
2269
&:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/small-radio-checked-symbolic.svg")); }
2270
2271
&:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/small-radio-mixed-symbolic.svg")); }
2272
}
2273
2274
// ANIMATION:
2275
// this is made with those pretty convoluted transitions, since checks and radios have to animate only on state changes,
2276
// the transformation is set on the active state and it get reset on the checked state.
2277
check:not(:checked):active { -gtk-icon-transform: rotate(90deg); }
2278
2279
// radio:not(:checked):active { -gtk-icon-transform: scale(0); }
2280
2281
check:not(:checked):indeterminate:active,
2282
radio:not(:checked):indeterminate:active { -gtk-icon-transform: scaleX(-1); } // instead of rotateY(180deg)
2283
2284
check:not(:checked),
2285
radio:not(:checked) {
2286
& {
2287
transition: $shorter_transition,
2288
background-size $ripple_duration $deceleration_curve,
2289
background-image $ripple_opacity_duration $deceleration_curve,
2290
-gtk-icon-transform 0;
2291
}
2292
2293
&:active {
2294
transition: $shorter_transition,
2295
background-size 0,
2296
background-image 0,
2297
-gtk-icon-transform 0;
2298
}
2299
2300
menu menuitem & { transition: none; }
2301
}
2302
2303
treeview.view check,
2304
treeview.view radio {
2305
padding: 0;
2306
2307
&:hover {
2308
box-shadow: inset 0 0 0 9999px gtkalpha($fg_color, 0.08);
2309
2310
&:disabled { box-shadow: none; }
2311
2312
&:selected { box-shadow: inset 0 0 0 9999px gtkalpha($inverse_fg_color, 0.08); }
2313
}
2314
2315
& {
2316
color: $secondary_fg_color;
2317
2318
&:hover, &:active { color: $fg_color; }
2319
2320
&:disabled { color: $disabled_secondary_fg_color; }
2321
2322
&:checked, &:indeterminate { color: $secondary_color; }
2323
2324
&:checked:disabled, &:indeterminate:disabled { color: $disabled_secondary_color; }
2325
}
2326
2327
&:selected {
2328
color: $inverse_secondary_fg_color;
2329
2330
&:hover, &:active { color: $inverse_fg_color; }
2331
2332
&:disabled { color: $inverse_disabled_secondary_fg_color; }
2333
2334
&:checked, &:indeterminate { color: $secondary_color; }
2335
2336
&:checked:disabled, &:indeterminate:disabled { color: $disabled_secondary_color; }
2337
}
2338
}
2339
2340
treeview.view radio:checked {
2341
-gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-checked-symbolic.svg"));
2342
border-image: none;
2343
}
2344
2345
2346
/************
2347
* GtkScale *
2348
************/
2349
scale {
2350
// sizing
2351
$_marks_length: 8px;
2352
$_marks_distance: 7px;
2353
2354
$trough_size: 2px;
2355
$finetune_trough_size: 4px;
2356
2357
$slider_size: 32px;
2358
2359
$slider_margin: -($slider_size - $trough_size) / 2;
2360
$finetune_slider_margin: -($slider_size - $finetune_trough_size) / 2;
2361
2362
$color_slider_margin: -($slider_size) * 3 / 4;
2363
$color_marks_slider_margin: -($slider_size - 16px) - $color_slider_margin;
2364
2365
min-height: $trough_size;
2366
min-width: $trough_size;
2367
2368
&.horizontal { padding: ($medium_size - $trough_size) / 2 12px; }
2369
2370
&.vertical { padding: 12px ($medium_size - $trough_size) / 2; }
2371
2372
// the slider is inside the trough, so to have make it bigger there's a negative margin
2373
slider {
2374
min-height: $slider_size;
2375
min-width: $slider_size;
2376
margin: $slider_margin;
2377
}
2378
2379
// click-and-hold the slider to activate
2380
&.fine-tune {
2381
&.horizontal {
2382
min-height: $finetune_trough_size;
2383
padding-top: ($medium_size - $finetune_trough_size) / 2;
2384
padding-bottom: ($medium_size - $finetune_trough_size) / 2;
2385
}
2386
2387
&.vertical {
2388
min-width: $finetune_trough_size;
2389
padding-left: ($medium_size - $finetune_trough_size) / 2;
2390
padding-right: ($medium_size - $finetune_trough_size) / 2;
2391
}
2392
2393
// to make the trough grow in fine-tune mode
2394
slider { margin: $finetune_slider_margin; }
2395
}
2396
2397
// the backing bit
2398
trough {
2399
transition: background-color $shorter_duration $deceleration_curve;
2400
outline: none;
2401
background-color: $track_color;
2402
2403
&:disabled { background-color: $divider_color; }
2404
}
2405
2406
// the colored part of the backing bit
2407
highlight {
2408
transition: background-color $shorter_duration $deceleration_curve;
2409
background-color: $secondary_color;
2410
2411
&:disabled { background-color: transparent; }
2412
}
2413
2414
// this is another differently styled part of the backing bit, the most relevant use case is for example
2415
// in media player to indicate how much video stream as been cached
2416
fill {
2417
transition: background-color $shorter_duration $deceleration_curve;
2418
background-color: $track_color;
2419
2420
&:disabled { background-color: transparent; }
2421
}
2422
2423
slider {
2424
transition: background-color $shorter_duration $deceleration_curve,
2425
background-size $ripple_duration $deceleration_curve,
2426
background-image $ripple_opacity_duration $deceleration_curve;
2427
background-repeat: no-repeat;
2428
background-position: center;
2429
background-size: auto, 1000% 1000%;
2430
border-radius: 50%;
2431
color: transparent;
2432
2433
@each $s, $as in ('', ''),
2434
(':disabled', '-disabled') {
2435
&#{$s} {
2436
$_url: 'assets/scale-slider#{$as}#{$asset_suffix}';
2437
2438
background-image: -gtk-scaled(url('#{$_url}.png'), url('#{$_url}@2.png')),
2439
radial-gradient(circle farthest-corner at center,
2440
currentColor 10%,
2441
transparent 0%);
2442
}
2443
}
2444
2445
&:hover { background-color: rgba($secondary_color, 0.08); }
2446
2447
&:focus { background-color: rgba($secondary_color, 0.12); }
2448
2449
&:focus:hover { background-color: rgba($secondary_color, 0.16); }
2450
2451
&:active {
2452
transition: background-color $shorter_duration $deceleration_curve,
2453
background-size 0,
2454
background-image 0;
2455
animation: scale_ripple_effect $longer_duration $deceleration_curve forwards;
2456
background-size: auto, 0% 0%;
2457
background-color: rgba($secondary_color, 0.08);
2458
color: rgba($secondary_color, 0.12);
2459
}
2460
}
2461
2462
marks label,
2463
value { color: $hint_fg_color; }
2464
2465
marks {
2466
color: $track_color;
2467
2468
@each $marks_class, $marks_pos, $marks_margin in (top, top, bottom),
2469
(bottom, bottom, top),
2470
(left, left, right),
2471
(right, right, left) {
2472
&.#{$marks_class} {
2473
margin-#{$marks_margin}: $_marks_distance;
2474
margin-#{$marks_pos}: -($_marks_distance + $_marks_length);
2475
}
2476
}
2477
}
2478
2479
&.fine-tune marks {
2480
@each $marks_class, $marks_pos, $marks_margin in (top, top, bottom),
2481
(bottom, bottom, top),
2482
(left, left, right),
2483
(right, right, left) {
2484
&.#{$marks_class} {
2485
margin-#{$marks_margin}: $_marks_distance - 1px;
2486
margin-#{$marks_pos}: -($_marks_distance + $_marks_length - 1px);
2487
}
2488
}
2489
}
2490
2491
&.horizontal {
2492
indicator {
2493
min-height: $_marks_length;
2494
min-width: 1px;
2495
}
2496
}
2497
2498
&.vertical {
2499
indicator {
2500
min-height: 1px;
2501
min-width: $_marks_length;
2502
}
2503
}
2504
2505
// *WARNING* scale with marks madness following
2506
2507
@each $dir_class, $dir_infix in ('horizontal', 'horz'),
2508
('vertical', 'vert') {
2509
@each $marks_infix, $marks_class in ('marks-before', 'marks-before:not(.marks-after)'),
2510
('marks-after', 'marks-after:not(.marks-before)') {
2511
&.#{$dir_class}.#{$marks_class} {
2512
slider {
2513
@each $state, $state_infix in ('', ''),
2514
(':disabled', '-disabled') {
2515
&#{$state} {
2516
$_scale_asset: 'assets/scale-#{$dir_infix}-#{$marks_infix}-slider#{$state_infix}#{$asset_suffix}';
2517
2518
background-image: -gtk-scaled(url('#{$_scale_asset}.png'), url('#{$_scale_asset}@2.png')),
2519
radial-gradient(circle farthest-corner at center,
2520
currentColor 10%,
2521
transparent 0%);
2522
}
2523
}
2524
}
2525
}
2526
}
2527
}
2528
2529
&.color {
2530
min-height: 0;
2531
min-width: 0;
2532
2533
&.horizontal {
2534
padding: 0 0 12px 0;
2535
2536
slider {
2537
&:dir(ltr), &:dir(rtl) { // specificity bump
2538
margin-bottom: $color_slider_margin;
2539
margin-top: $color_marks_slider_margin;
2540
}
2541
}
2542
}
2543
2544
&.vertical {
2545
&:dir(ltr) {
2546
padding: 0 0 0 12px;
2547
2548
slider {
2549
margin-left: $color_slider_margin;
2550
margin-right: $color_marks_slider_margin;
2551
}
2552
}
2553
2554
&:dir(rtl) {
2555
padding: 0 12px 0 0;
2556
2557
slider {
2558
margin-right: $color_slider_margin;
2559
margin-left: $color_marks_slider_margin;
2560
}
2561
}
2562
}
2563
}
2564
}
2565
2566
2567
/*****************
2568
* Progress bars *
2569
*****************/
2570
progressbar {
2571
// sizing
2572
&.horizontal {
2573
trough,
2574
progress { min-height: $bar_size; }
2575
}
2576
2577
&.vertical {
2578
trough,
2579
progress { min-width: $bar_size; }
2580
}
2581
2582
// FIXME: insensitive state missing and some other state should be set probably
2583
color: $hint_fg_color;
2584
font-size: smaller;
2585
2586
trough { background-color: rgba($primary_color, 0.3); }
2587
2588
progress { background-color: $primary_color; }
2589
2590
&.osd { // progressbar.osd used for epiphany page loading progress
2591
// min-width: $bar_size;
2592
// min-height: $bar_size;
2593
// background-color: transparent;
2594
2595
// trough { background-color: transparent; }
2596
2597
// progress { background-color: $primary_color; }
2598
}
2599
2600
trough.empty progress { all: unset; } // makes the progress indicator disappear, when the fraction is 0
2601
}
2602
2603
2604
/*************
2605
* Level Bar *
2606
*************/
2607
levelbar {
2608
&.horizontal {
2609
block { min-height: $bar_size; }
2610
2611
&.discrete block {
2612
min-width: $medium_size;
2613
2614
&:not(:last-child) { margin-right: 2px; }
2615
}
2616
}
2617
2618
&.vertical {
2619
block { min-width: $bar_size; }
2620
2621
&.discrete block {
2622
min-height: $medium_size;
2623
2624
&:not(:last-child) { margin-bottom: 2px; }
2625
}
2626
}
2627
2628
// imitate the entry style
2629
trough {
2630
// padding: 2px;
2631
// border-radius: $material_radius;
2632
// box-shadow: $shadow_1;
2633
// background-color: $base_color;
2634
2635
// &:disabled { background-color: $alt_base_color; }
2636
}
2637
2638
block {
2639
&.low { background-color: $warning_color; }
2640
2641
&.high,
2642
&:not(.empty) { background-color: $primary_color; }
2643
2644
&.full { background-color: $success_color; }
2645
2646
&.empty { background-color: $divider_color; }
2647
}
2648
}
2649
2650
2651
/****************
2652
* Print dialog *
2653
*****************/
2654
printdialog {
2655
paper {
2656
padding: 0;
2657
border: 1px solid $border_color;
2658
background-color: $base_color;
2659
color: $fg_color;
2660
}
2661
2662
.dialog-action-box { margin: 12px; }
2663
}
2664
2665
2666
/**********
2667
* Frames *
2668
**********/
2669
frame > border,
2670
.frame {
2671
margin: 0;
2672
padding: 0;
2673
border: 1px solid $border_color;
2674
border-radius: 0;
2675
box-shadow: none;
2676
2677
&.flat { border-style: none; }
2678
}
2679
2680
frame.flat > border { @extend .frame.flat; } // for backward compatibility
2681
2682
actionbar > revealer > box {
2683
padding: $container_padding;
2684
border-top: 1px solid $border_color;
2685
2686
button:not(.suggested-action):not(.destructive-action):not(.server-list-button) { @extend %button_basic.flat; }
2687
}
2688
2689
scrolledwindow {
2690
viewport.frame { // avoid double borders when viewport inside scrolled window
2691
border-style: none;
2692
}
2693
2694
// This is used when content is touch-dragged past boundaries.
2695
// draws a box on top of the content, the size changes programmatically.
2696
@at-root overshoot {
2697
&.top { @include overshoot(top); }
2698
2699
&.bottom { @include overshoot(bottom); }
2700
2701
&.left { @include overshoot(left); }
2702
2703
&.right { @include overshoot(right); }
2704
}
2705
2706
// Overflow indication, works similarly to the overshoot, the size if fixed tho.
2707
@at-root undershoot {
2708
&.top { @include undershoot(top); }
2709
2710
&.bottom { @include undershoot(bottom); }
2711
2712
&.left { @include undershoot(left); }
2713
2714
&.right { @include undershoot(right); }
2715
}
2716
2717
@at-root junction { // the small square between two scrollbars
2718
border-style: solid none none solid;
2719
border-width: 1px;
2720
border-color: $border_color;
2721
background-color: $base_color;
2722
2723
&:dir(rtl) { border-style: solid solid none none; }
2724
}
2725
}
2726
2727
// vbox and hbox separators
2728
separator {
2729
min-width: 1px;
2730
min-height: 1px;
2731
background-color: $border_color;
2732
}
2733
2734
%hide_separators {
2735
min-width: 0;
2736
min-height: 0;
2737
background-color: transparent;
2738
}
2739
2740
2741
/*********
2742
* Lists *
2743
*********/
2744
list {
2745
border-color: $border_color;
2746
background-color: $base_color;
2747
2748
row { padding: 2px; }
2749
}
2750
2751
// FIXME
2752
$row_transition: $shorter_transition, background-color 0, color 0;
2753
2754
row {
2755
&.activatable {
2756
transition: $row_transition,
2757
background-size $ripple_duration $deceleration_curve,
2758
background-image $ripple_opacity_duration $deceleration_curve;
2759
box-shadow: inset 0 0 0 9999px transparent;
2760
background-image: radial-gradient(circle farthest-corner at center,
2761
transparent 10%,
2762
transparent 0%);
2763
background-repeat: no-repeat;
2764
background-position: center;
2765
background-size: 1000% 1000%;
2766
2767
&:hover {
2768
transition: $row_transition,
2769
box-shadow 0,
2770
background-size $ripple_duration $deceleration_curve,
2771
background-image $ripple_opacity_duration $deceleration_curve;
2772
box-shadow: inset 0 0 0 9999px $hover_bg_color;
2773
}
2774
2775
&.has-open-popup, // this is for indicathing which row generated a popover see https://bugzilla.gnome.org/show_bug.cgi?id=754411
2776
&:active {
2777
transition: $row_transition,
2778
background-size 0,
2779
background-image 0;
2780
animation: ripple_effect $longer_duration $deceleration_curve forwards;
2781
box-shadow: inset 0 0 0 9999px $hover_bg_color;
2782
background-image: radial-gradient(circle farthest-corner at center,
2783
$active_bg_color 10%,
2784
transparent 0%);
2785
background-size: 0% 0%;
2786
}
2787
}
2788
2789
&:selected { @extend %selected_items; }
2790
}
2791
2792
2793
/*********************
2794
* App Notifications *
2795
*********************/
2796
.app-notification {
2797
// @extend %osd;
2798
2799
@extend toolbar.osd;
2800
2801
margin: 8px;
2802
2803
button { @extend %button_basic.flat; }
2804
2805
&.frame,
2806
border { border-style: none; }
2807
}
2808
2809
2810
/*************
2811
* Expanders *
2812
*************/
2813
expander {
2814
title > arrow {
2815
transition: all $shorter_duration $deceleration_curve;
2816
min-width: 16px;
2817
min-height: 16px;
2818
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
2819
-gtk-icon-transform: rotate(-90deg);
2820
2821
&:dir(rtl) { -gtk-icon-transform: rotate(90deg); }
2822
2823
&:checked { -gtk-icon-transform: unset; }
2824
2825
color: $secondary_fg_color;
2826
2827
&:hover, &:active { color: $fg_color; }
2828
2829
&:disabled { color: $disabled_secondary_fg_color; }
2830
2831
&:selected {
2832
color: $inverse_secondary_fg_color;
2833
2834
&:hover, &:active { color: $inverse_fg_color; }
2835
2836
&:disabled { color: $inverse_disabled_secondary_fg_color; }
2837
}
2838
}
2839
}
2840
2841
2842
/************
2843
* Calendar *
2844
************/
2845
calendar {
2846
padding: 1px;
2847
border: 1px solid $border_color;
2848
color: $fg_color;
2849
2850
&:disabled { color: $disabled_fg_color; }
2851
2852
&:selected {
2853
@extend %selected_items;
2854
2855
border-radius: $material_radius + 1px;
2856
}
2857
2858
&.header {
2859
border-style: none none solid;
2860
border-radius: 0;
2861
}
2862
2863
&.button { @extend %simple_flat_button; }
2864
2865
&.highlight {
2866
color: $secondary_fg_color;
2867
font-weight: 500;
2868
}
2869
2870
&:indeterminate { color: $disabled_secondary_fg_color; }
2871
}
2872
2873
2874
/***********
2875
* Dialogs *
2876
***********/
2877
messagedialog { // Message Dialog styling
2878
&.background { background-color: $popup_bg_color; }
2879
2880
.titlebar {
2881
min-height: $small_size;
2882
border-style: none;
2883
box-shadow: inset 0 1px $highlight_color;
2884
background-color: $popup_bg_color;
2885
color: $fg_color;
2886
2887
&:backdrop { color: $secondary_fg_color; }
2888
}
2889
2890
&.csd { // rounded bottom border styling for csd version
2891
&.background {
2892
// bigger radius for better antialiasing
2893
border-bottom-left-radius: $material_radius;
2894
border-bottom-right-radius: $material_radius;
2895
}
2896
2897
.dialog-action-area {
2898
margin-top: -$container_padding;
2899
padding: $container_padding;
2900
2901
button {
2902
@extend %simple_flat_button;
2903
border-radius: $material_radius;
2904
2905
&:not(:last-child) { margin-right: $container_padding; }
2906
2907
&.suggested-action:not(:disabled) { color: $suggested_color; }
2908
2909
&.destructive-action:not(:disabled) { color: $destructive_color; }
2910
}
2911
}
2912
}
2913
2914
entry { @extend %entry.flat; }
2915
}
2916
2917
filechooser {
2918
.dialog-action-box { border-top: 1px solid $border_color; }
2919
2920
#pathbarbox {
2921
border-bottom: 1px solid $border_color;
2922
background-color: $bg_color;
2923
}
2924
}
2925
2926
filechooserbutton:drop(active) {
2927
box-shadow: none;
2928
}
2929
2930
2931
/***********
2932
* Sidebar *
2933
***********/
2934
.sidebar {
2935
border-style: none;
2936
background-color: $alt_base_color;
2937
2938
@at-root %sidebar_left,
2939
&:dir(ltr),
2940
&.left,
2941
&.left:dir(rtl) {
2942
border-right: 1px solid $border_color;
2943
border-left-style: none;
2944
}
2945
2946
@at-root %sidebar_right,
2947
&:dir(rtl),
2948
&.right {
2949
border-left: 1px solid $border_color;
2950
border-right-style: none;
2951
}
2952
2953
list { background-color: transparent; }
2954
2955
paned & { &.left, &.right, &.left:dir(rtl), &:dir(rtl), &:dir(ltr), & { border-style: none; }}
2956
}
2957
2958
stacksidebar {
2959
&.sidebar {
2960
&:dir(ltr),
2961
&.left,
2962
&.left:dir(rtl) { list { @extend %sidebar_left; }}
2963
2964
&:dir(rtl),
2965
&.right { list { @extend %sidebar_right; }}
2966
}
2967
2968
row {
2969
padding: 10px 4px;
2970
2971
> label {
2972
padding-left: 6px;
2973
padding-right: 6px;
2974
}
2975
2976
&.needs-attention > label { @extend %needs_attention; }
2977
}
2978
}
2979
2980
2981
/****************
2982
* File chooser *
2983
****************/
2984
// dim the sidebar icons, see bug #786613 for details on this oddity
2985
row {
2986
image.sidebar-icon { color: $secondary_fg_color; }
2987
2988
&:selected image.sidebar-icon { color: $inverse_secondary_fg_color; }
2989
}
2990
2991
placessidebar {
2992
> viewport.frame { border-style: none; }
2993
2994
list { padding: (4px - 3px) 0 4px; }
2995
2996
row {
2997
// Needs overriding of the GtkListBoxRow padding
2998
min-height: 32px;
2999
margin: -1px 0; // Remove unknown margins
3000
padding: 0;
3001
3002
// Using margins/padding directly in the SidebarRow
3003
// will make the animation of the new bookmark row jump
3004
> revealer { padding: 0 12px; }
3005
3006
&:selected { color: $inverse_fg_color; }
3007
3008
&:disabled { color: $disabled_fg_color; }
3009
3010
image.sidebar-icon {
3011
&:dir(ltr) { padding-right: 8px; }
3012
&:dir(rtl) { padding-left: 8px; }
3013
}
3014
3015
label.sidebar-label {
3016
&:dir(ltr) { padding-right: 2px; }
3017
&:dir(rtl) { padding-left: 2px; }
3018
}
3019
3020
@at-root button.sidebar-button {
3021
@extend %simple_flat_button;
3022
3023
@extend %small_button;
3024
3025
row:selected & { @extend %button_selected.flat; }
3026
}
3027
3028
&.sidebar-placeholder-row {
3029
min-height: 2px;
3030
padding: 0 8px;
3031
background-image: image($secondary_color);
3032
background-clip: content-box;
3033
}
3034
3035
&.sidebar-new-bookmark-row { color: $secondary_color; }
3036
3037
&:drop(active):not(:disabled) {
3038
box-shadow: inset 0 0 0 2px $secondary_color;
3039
3040
&:selected {
3041
// background-color: $secondary_color;
3042
// color: $inverse_fg_color;
3043
}
3044
}
3045
}
3046
}
3047
3048
placesview {
3049
.server-list-button > image { -gtk-icon-transform: rotate(0turn); }
3050
3051
.server-list-button:checked > image { -gtk-icon-transform: rotate(-0.5turn); }
3052
3053
// this selects the "connect to server" label
3054
> actionbar > revealer > box > label {
3055
padding-left: 8px;
3056
padding-right: 8px;
3057
}
3058
}
3059
3060
3061
/*********
3062
* Paned *
3063
*********/
3064
paned {
3065
> separator {
3066
min-width: 1px;
3067
min-height: 1px;
3068
-gtk-icon-source: none; // defeats the ugly default handle decoration
3069
border-style: none; // just to be sure
3070
background-color: transparent;
3071
// workaround, using background istead of a border since the border will get rendered twice (?)
3072
background-image: image($border_color);
3073
background-size: 1px 1px;
3074
background-clip: content-box; // avoids borders image being rendered twice (?)
3075
3076
&.wide {
3077
min-width: 6px;
3078
min-height: 6px;
3079
background-color: $bg_color;
3080
background-image: image($border_color), image($border_color);
3081
background-size: 1px 1px, 1px 1px;
3082
}
3083
}
3084
3085
&.horizontal > separator {
3086
background-repeat: repeat-y;
3087
3088
&:dir(ltr) {
3089
margin: 0 -8px 0 0;
3090
padding: 0 8px 0 0;
3091
background-position: left;
3092
}
3093
3094
&:dir(rtl) {
3095
margin: 0 0 0 -8px;
3096
padding: 0 0 0 8px;
3097
background-position: right;
3098
}
3099
3100
&.wide {
3101
margin: 0;
3102
padding: 0;
3103
background-repeat: repeat-y, repeat-y;
3104
background-position: left, right;
3105
}
3106
}
3107
3108
&.vertical > separator {
3109
margin: 0 0 -8px 0;
3110
padding: 0 0 8px 0;
3111
background-repeat: repeat-x;
3112
background-position: top;
3113
3114
&.wide {
3115
margin: 0;
3116
padding: 0;
3117
background-repeat: repeat-x, repeat-x;
3118
background-position: bottom, top;
3119
}
3120
}
3121
}
3122
3123
3124
/**************
3125
* GtkInfoBar *
3126
**************/
3127
infobar {
3128
border-style: none;
3129
3130
&.info { background-color: $info_bg_color; }
3131
3132
&.question { background-color: $question_bg_color; }
3133
3134
&.warning { background-color: $warning_bg_color; }
3135
3136
&.error { background-color: $error_bg_color; }
3137
3138
&.info,
3139
&.question,
3140
&.warning,
3141
&.error {
3142
> label, & { color: $inverse_fg_color; }
3143
3144
button { @extend %button_selected; }
3145
3146
selection {}
3147
3148
*:link { @extend %link_selected; }
3149
}
3150
}
3151
3152
3153
/************
3154
* Tooltips *
3155
************/
3156
tooltip {
3157
&.background {
3158
// background-color needs to be set this way otherwise it gets drawn twice
3159
// see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
3160
// box-shadow: inset 0 1px $highlight_color;
3161
background-color: $tooltip_bg_color;
3162
color: $tooltip_fg_color;
3163
}
3164
3165
// padding: 4px; /* not working */
3166
border-radius: $material_radius;
3167
box-shadow: none; // otherwise it gets inherited by windowframe.csd
3168
3169
&:not(.csd):not(.unity-csd) {
3170
// border: 1px solid $border_color;
3171
// border-radius: $material_radius + 1px;
3172
// background-clip: $extra_background_clip;
3173
}
3174
3175
// FIXME: we need a border or tooltips vanish on black background.
3176
decoration { background-color: transparent; }
3177
3178
label {
3179
// tooltip label already seems to have 6px margins
3180
min-height: 32px - 6px * 2;
3181
padding: 0 8px - 6px;
3182
}
3183
3184
* {
3185
// workaround for Eclipse.
3186
// do not include any declaration here.
3187
// padding: 0;
3188
// background-color: transparent;
3189
// color: inherit;
3190
}
3191
}
3192
3193
3194
/*****************
3195
* Color Chooser *
3196
*****************/
3197
colorswatch {
3198
// This widget is made of two boxes one on top of the other, the lower box is colorswatch {} the other one
3199
// is colorswatch overlay {}, colorswatch has the programmatically set background, so most of the style is
3200
// applied to the overlay box.
3201
3202
// base color corners rounding
3203
// to avoid the artifacts caused by rounded corner anti-aliasing the base color
3204
// sports a bigger radius.
3205
// nth-child is needed by the custom color strip.
3206
3207
&.top {
3208
border-top-left-radius: $material_radius + 0.5px;
3209
border-top-right-radius: $material_radius + 0.5px;
3210
3211
overlay {
3212
border-top-left-radius: $material_radius;
3213
border-top-right-radius: $material_radius;
3214
}
3215
}
3216
3217
&.bottom {
3218
border-bottom-left-radius: $material_radius + 0.5px;
3219
border-bottom-right-radius: $material_radius + 0.5px;
3220
3221
overlay {
3222
border-bottom-left-radius: $material_radius;
3223
border-bottom-right-radius: $material_radius;
3224
}
3225
}
3226
3227
&.left,
3228
&:first-child:not(.top) {
3229
border-top-left-radius: $material_radius + 0.5px;
3230
border-bottom-left-radius: $material_radius + 0.5px;
3231
3232
overlay {
3233
border-top-left-radius: $material_radius;
3234
border-bottom-left-radius: $material_radius;
3235
}
3236
}
3237
3238
&.right,
3239
&:last-child:not(.bottom) {
3240
border-top-right-radius: $material_radius + 0.5px;
3241
border-bottom-right-radius: $material_radius + 0.5px;
3242
3243
overlay {
3244
border-top-right-radius: $material_radius;
3245
border-bottom-right-radius: $material_radius;
3246
}
3247
}
3248
3249
&.dark { color: $light_fg_color; }
3250
3251
&.light { color: $dark_fg_color; }
3252
3253
&:drop(active) {
3254
box-shadow: none;
3255
3256
&.light overlay { box-shadow: $shadow_1, 0 0 0 2px $secondary_color; }
3257
3258
&.dark overlay { box-shadow: $shadow_1, 0 0 0 2px $secondary_color; }
3259
}
3260
3261
overlay {
3262
transition: $shadow_transition;
3263
box-shadow: $shadow_1;
3264
3265
&:hover { box-shadow: $shadow_2; }
3266
}
3267
3268
&#add-color-button {
3269
border-radius: $material_radius $material_radius 0 0;
3270
color: $light_fg_color;
3271
3272
&:only-child { border-radius: $material_radius; }
3273
3274
overlay {
3275
background-image: linear-gradient(to right,
3276
$error_bg_color 25%,
3277
$warning_bg_color 25%, $warning_bg_color 50%,
3278
$info_bg_color 50%, $info_bg_color 75%,
3279
$question_bg_color 75%);
3280
}
3281
}
3282
3283
&:disabled {
3284
opacity: 0.5;
3285
3286
overlay { box-shadow: none; }
3287
}
3288
3289
row:selected & {
3290
}
3291
3292
&#editor-color-sample {
3293
border-radius: $material_radius + 0.5px;
3294
3295
overlay { border-radius: $material_radius; }
3296
3297
// overlay:hover { box-shadow: $shadow_1; }
3298
}
3299
}
3300
3301
// colorscale popup
3302
colorchooser .popover.osd {
3303
transition: $shadow_transition;
3304
border-radius: $material_radius;
3305
box-shadow: $shadow_2, inset 0 1px $highlight_color;
3306
background-color: $popup_bg_color;
3307
3308
&:backdrop { box-shadow: $shadow_1, inset 0 1px $highlight_color; }
3309
3310
spinbutton:not(.vertical) { @extend %entry.flat; }
3311
}
3312
3313
3314
/********
3315
* Misc *
3316
********/
3317
// content view (grid/list)
3318
.content-view {
3319
background-color: $bg_color;
3320
3321
// &:hover { -gtk-icon-effect: highlight; }
3322
3323
rubberband, .rubberband { @extend rubberband; }
3324
}
3325
3326
.scale-popup {
3327
// .osd & { @extend %osd; }
3328
3329
.osd & button.flat { // FIXME: quick hack, redo properly
3330
}
3331
3332
button { // +/- buttons on GtkVolumeButton popup
3333
}
3334
}
3335
3336
3337
/**********************
3338
* Window Decorations *
3339
**********************/
3340
decoration {
3341
transition: $shadow_transition;
3342
border-radius: $material_radius $material_radius 0 0;
3343
box-shadow: $shadow_4, 0 16px 16px transparent;
3344
3345
// FIXME rationalize shadows
3346
3347
// this is used for the resize cursor area
3348
margin: 8px;
3349
3350
&:backdrop {
3351
// the transparent shadow here is to enforce that the shadow extents don't
3352
// change when we go to backdrop, to prevent jumping windows.
3353
// The biggest shadow should be in the same order then in the active state
3354
// or the jumping will happen during the transition.
3355
box-shadow: $shadow_2, 0 16px 16px transparent;
3356
}
3357
3358
.maximized &,
3359
.fullscreen &,
3360
.tiled &,
3361
.tiled-top &,
3362
.tiled-right &,
3363
.tiled-bottom &,
3364
.tiled-left & { border-radius: 0; }
3365
3366
.popup & { box-shadow: none; }
3367
3368
// server-side decorations as used by mutter
3369
.ssd & { box-shadow: 0 3px 3px rgba(0, 0, 0, 0.16); } // just doing borders, wm draws actual shadows
3370
3371
.csd.popup & {
3372
border-radius: $material_radius;
3373
box-shadow: $shadow_2;
3374
}
3375
3376
tooltip.csd & {
3377
border-radius: $material_radius;
3378
box-shadow: none;
3379
}
3380
3381
messagedialog.csd & {
3382
border-radius: $material_radius;
3383
// box-shadow: $shadow_4, 0 16px 16px transparent;
3384
3385
// &:backdrop { box-shadow: $shadow_2, 0 16px 16px transparent; }
3386
}
3387
3388
.solid-csd & {
3389
margin: 0;
3390
// padding: 4px;
3391
border-radius: 0;
3392
box-shadow: none;
3393
// box-shadow: inset 0 0 0 4px $titlebar_bg_color;
3394
background-color: $titlebar_bg_color;
3395
}
3396
}
3397
3398
// Window Close button
3399
button.titlebutton {
3400
// @extend %simple_flat_button;
3401
3402
@extend %circular_button;
3403
3404
.selection-mode & {
3405
}
3406
}
3407
3408
3409
// catch all extend :)
3410
3411
%selected_items {
3412
background-color: $primary_color;
3413
3414
@at-root %nobg_selected_items, & {
3415
color: $inverse_fg_color;
3416
3417
&:disabled { color: $inverse_disabled_fg_color; }
3418
}
3419
}
3420
3421
.monospace { font-family: monospace; }
3422
3423
3424
/**********************
3425
* Touch Copy & Paste *
3426
**********************/
3427
// touch selection handlebars for the Popover.osd above
3428
cursor-handle {
3429
border-radius: $circular_radius;
3430
background-color: $secondary_color;
3431
background-image: none;
3432
3433
&.top:dir(ltr), &.bottom:dir(rtl) {
3434
padding-left: 6px;
3435
border-top-right-radius: 0;
3436
}
3437
3438
&.bottom:dir(ltr), &.top:dir(rtl) {
3439
padding-right: 6px;
3440
border-top-left-radius: 0;
3441
}
3442
3443
&.insertion-cursor:dir(ltr), &.insertion-cursor:dir(rtl) {
3444
-GtkWidget-text-handle-width: 24;
3445
-GtkWidget-text-handle-height: 30;
3446
3447
$_url: 'assets/scale-horz-marks-before-slider#{$asset_suffix}';
3448
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
3449
url('#{$_url}@2.png'));
3450
}
3451
}
3452
3453
.context-menu { font: initial; } // Decouple the font of context menus from their entry/textview
3454
3455
// shortcut window keys
3456
.keycap {
3457
min-width: 28px - 8px * 2;
3458
min-height: 28px - 2px;
3459
margin-top: 2px;
3460
padding-bottom: 2px;
3461
padding-left: 8px;
3462
padding-right: 8px;
3463
3464
border: solid 1px $border_color;
3465
border-radius: $material_radius + 1px;
3466
box-shadow: inset 0 -2px $border_color;
3467
background-color: $popup_bg_color;
3468
color: $fg_color;
3469
font-size: smaller;
3470
}
3471
3472
:not(decoration):not(window):drop(active) { // FIXME needs to be done widget by widget, this wildcard should really die
3473
transition: $shorter_transition;
3474
box-shadow: $shadow_1, inset 0 0 0 2px $secondary_color;
3475
caret-color: $secondary_color;
3476
}
3477
3478
stackswitcher button.text-button { min-width: 100px; } // FIXME aggregate with buttons
3479
3480
stackswitcher button.circular,
3481
stackswitcher button.text-button.circular { // FIXME aggregate with buttons
3482
min-width: $medium_size;
3483
min-height: $medium_size;
3484
padding: 0;
3485
}
3486
3487
3488
/*********
3489
* Emoji *
3490
*********/
3491
popover.emoji-picker {
3492
padding: 0;
3493
3494
entry {
3495
border-bottom: 1px solid $border_color;
3496
border-radius: 0;
3497
box-shadow: none;
3498
background-color: transparent;
3499
}
3500
3501
scrolledwindow { border-bottom: 1px solid $border_color; }
3502
}
3503
3504
// mimic tab style
3505
button.emoji-section {
3506
margin-top: -1px;
3507
padding: 0 8px;
3508
min-width: 24px;
3509
min-height: $medium_size;
3510
border-radius: 0;
3511
outline-offset: -6px;
3512
3513
&, &:hover, &:active { box-shadow: inset 0 2px transparent; }
3514
3515
&:checked {
3516
box-shadow: inset 0 2px $primary_color;
3517
background-color: transparent;
3518
}
3519
3520
&:hover, &:active { background-color: $hover_bg_color; }
3521
3522
&:first-child { margin-left: 4px; }
3523
3524
&:last-child { margin-right: 4px; }
3525
}
3526
3527
.emoji {
3528
min-width: 3em;
3529
min-height: 3em;
3530
padding: 0 8px;
3531
// font-size: larger;
3532
3533
widget {
3534
transition: $shorter_transition;
3535
border-radius: $material_radius;
3536
3537
&:hover { background-color: $hover_bg_color; }
3538
}
3539
}
3540