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