_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_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: $secondary_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
headerbar &,
160
tab &,
161
button & { color: inherit; }
162
}
163
}
164
165
.dim-label { opacity: 0.6; }
166
167
assistant {
168
.sidebar {
169
padding: 4px 0;
170
// background-color: $base_color;
171
// border-top: 1px solid $border_color;
172
}
173
174
// &.csd .sidebar { border-top-style: none; }
175
176
.sidebar label {
177
min-height: $medium_size;
178
padding: 0 12px;
179
color: $disabled_fg_color;
180
font-weight: 500;
181
182
&.highlight { color: $fg_color; }
183
}
184
}
185
186
// %osd, .osd { opacity: 0.9; }
187
188
189
/*********************
190
* Spinner Animation *
191
*********************/
192
@keyframes spin {
193
to { -gtk-icon-transform: rotate(1turn); }
194
}
195
196
spinner {
197
background: none;
198
opacity: 0; // non spinning spinner makes no sense
199
-gtk-icon-source: -gtk-icontheme('process-working-symbolic');
200
201
&:checked {
202
opacity: 1;
203
animation: spin 1s linear infinite;
204
205
&:disabled { opacity: 0.5; }
206
}
207
}
208
209
210
/****************
211
* Text Entries *
212
****************/
213
%entry,
214
entry {
215
%entry_basic, & {
216
min-height: $medium_size;
217
padding: 0 8px;
218
border-radius: $material_radius $material_radius 0 0;
219
220
@include entry(normal);
221
222
&:focus { @include entry(focus); }
223
224
&:disabled { @include entry(disabled); }
225
226
&.flat {
227
min-height: 0;
228
padding: 2px;
229
border-radius: 0;
230
background-color: transparent;
231
}
232
233
image { // icons inside the entry
234
// @extend %simple_flat_button;
235
236
// min-height: $small_size;
237
// min-width: $small_size;
238
// border-radius: $circular_radius;
239
// -gtk-outline-radius: $circular_radius;
240
color: $secondary_fg_color;
241
242
&:hover, &:active { color: $fg_color; }
243
244
&:disabled { color: $disabled_fg_color; }
245
246
&.left {
247
margin-left: ($medium_size - 16px) / 2 - 8px;
248
margin-right: 6px;
249
}
250
251
&.right {
252
margin-left: 6px;
253
margin-right: ($medium_size - 16px) / 2 - 8px;
254
}
255
}
256
257
undershoot {
258
&.left { @include undershoot(left); }
259
260
&.right { @include undershoot(right); }
261
}
262
263
selection { @extend %selected_items; }
264
265
// entry error and warning style
266
@each $e_type, $e_color in (error, $error_color),
267
(warning, $warning_color) {
268
&.#{$e_type} {
269
@include entry(normal, $e_color);
270
271
&:focus { @include entry(focus, $e_color); }
272
273
&:disabled { @include entry(disabled, $e_color); }
274
}
275
}
276
277
&:drop(active) {
278
// box-shadow: inset 0 0 0 2px $primary_color;
279
}
280
281
.osd & {
282
}
283
}
284
285
progress {
286
margin: 2px (2px - 8px);
287
border-bottom: 2px solid $primary_color;
288
background-color: transparent;
289
}
290
291
// linked entries
292
.linked:not(.vertical) > & { @extend %linked_entry; }
293
294
// Vertically linked entries
295
.linked.vertical > & { @extend %linked_vertical_entry; }
296
}
297
298
%entry_raised {
299
border-radius: $material_radius;
300
301
@include entry(raised-normal);
302
303
&:focus { @include entry(raised-focus); }
304
305
&:disabled { @include entry(raised-disabled); }
306
307
// entry error and warning style
308
@each $e_type, $e_color in (error, $error_color),
309
(warning, $warning_color) {
310
&.#{$e_type} {
311
@include entry(raised-normal, $e_color);
312
313
&:focus { @include entry(raised-focus, $e_color); }
314
315
&:disabled { @include entry(raised-disabled, $e_color); }
316
317
image {
318
color: $inverse_secondary_fg_color;
319
320
&:hover, &:active { color: $inverse_fg_color; }
321
322
&:disabled { color: $inverse_disabled_fg_color; }
323
}
324
}
325
}
326
}
327
328
treeview entry {
329
&.flat, & {
330
background-color: $base_color;
331
332
&, &:focus {
333
border-image: none;
334
box-shadow: none;
335
}
336
}
337
}
338
339
.entry-tag {
340
margin: 2px;
341
border-radius: $circular_radius;
342
box-shadow: none;
343
background-color: $divider_color;
344
color: $fg_color;
345
346
&:hover { background-image: image($divider_color); }
347
348
// side margins: compensate the entry padding with a negative margin
349
// then the negative margin itself
350
:dir(ltr) & {
351
margin-left: 4px;
352
margin-right: 0;
353
padding-left: 12px;
354
padding-right: 8px;
355
}
356
357
:dir(rtl) & {
358
margin-left: 0;
359
margin-right: 4px;
360
padding-left: 8px;
361
padding-right: 12px;
362
}
363
364
// seems any sizing doesn't work
365
&.button {
366
box-shadow: none;
367
background-color: transparent;
368
369
&:not(:hover):not(:active) { color: $secondary_fg_color; }
370
}
371
}
372
373
374
/***********
375
* Buttons *
376
***********/
377
// stuff for .needs-attention
378
@keyframes needs_attention {
379
from {
380
background-image: -gtk-gradient(radial,
381
center center, 0,
382
center center, 0.001,
383
to($primary_color),
384
to(transparent));
385
}
386
387
to {
388
background-image: -gtk-gradient(radial,
389
center center, 0,
390
center center, 0.5,
391
to($primary_color),
392
to(transparent));
393
}
394
}
395
396
%button,
397
button {
398
@at-root %button_basic, & {
399
min-height: 24px;
400
min-width: 16px;
401
padding: ($medium_size - 24px) / 2 ($medium_size - 16px) / 2;
402
border-radius: $material_radius;
403
font-weight: 500;
404
405
@include button(normal);
406
407
&:hover { @include button(hover); }
408
409
&:active { @include button(active); }
410
411
&:disabled { @include button(disabled); }
412
413
&:checked { @include button(checked); }
414
415
&:checked:disabled { @include button(checked-disabled); }
416
417
@at-root %flat_button, &.flat {
418
@at-root %simple_flat_button, & {
419
@include button(flat-normal);
420
421
&:hover { @include button(flat-hover); }
422
423
&:active { @include button(flat-active); }
424
425
&:disabled { @include button(flat-disabled); }
426
}
427
428
&:checked { @include button(flat-checked); }
429
430
&:checked:disabled { @include button(flat-checked-disabled); }
431
}
432
433
&.text-button {
434
padding-left: 16px;
435
padding-right: 16px;
436
}
437
438
&.image-button {
439
min-width: 24px;
440
padding: ($medium_size - 24px) / 2;
441
442
@extend %circular_button;
443
}
444
445
&.text-button.image-button {
446
border-radius: $material_radius;
447
-gtk-outline-radius: $material_radius;
448
449
label {
450
&:first-child { margin-left: 16px - ($medium_size - 24px) / 2; }
451
452
&:last-child { margin-right: 16px - ($medium_size - 24px) / 2; }
453
}
454
455
image:not(:only-child) { margin: 0 (24px - 16px) / 2; }
456
}
457
458
.linked > & { @extend %linked; }
459
460
.linked.vertical > & { @extend %linked_vertical; }
461
462
.linked > &.flat,
463
.linked.vertical > &.flat {
464
border-radius: $material_radius;
465
466
&.image-button { @extend %circular_button; }
467
468
&.text-button.image-button {
469
border-radius: $material_radius;
470
-gtk-outline-radius: $material_radius;
471
}
472
}
473
474
&:drop(active) {
475
// box-shadow: inset 0 0 0 2px $primary_color;
476
}
477
}
478
479
@at-root %button_selected, row:selected & {
480
&:disabled {
481
background-color: $inverse_divider_color;
482
color: $inverse_disabled_secondary_fg_color;
483
}
484
485
&.flat {
486
color: $inverse_secondary_fg_color;
487
488
&:hover, &:active { color: $inverse_fg_color; }
489
490
&:disabled { color: $inverse_disabled_secondary_fg_color; }
491
492
&:checked {
493
background-color: $inverse_track_color;
494
color: $inverse_fg_color;
495
}
496
497
&:checked:disabled {
498
background-color: $inverse_divider_color;
499
color: $inverse_disabled_fg_color;
500
}
501
}
502
}
503
504
// big standalone buttons like in Documents pager
505
&.osd {
506
padding: ($large_size - 24px) / 2 ($large_size - 16px) / 2;
507
508
&.image-button { padding: ($large_size - 24px) / 2; }
509
510
&:disabled { opacity: 0; }
511
}
512
513
// overlay / OSD style
514
@at-root %osd_button,
515
.osd & {
516
}
517
518
// Suggested and Destructive Action buttons
519
@each $b_type, $b_color in (suggested-action, $suggested_color),
520
(destructive-action, $destructive_color) {
521
&.#{$b_type} {
522
background-color: $b_color;
523
color: $inverse_fg_color;
524
525
&:disabled { @include button(disabled, $b_color); }
526
527
&:checked { background-color: mix($inverse_fg_color, $b_color, percentage(0.3)); }
528
529
&.flat {
530
background-color: transparent;
531
color: $b_color;
532
533
&:disabled { @include button(flat-disabled, $b_color); }
534
535
&:checked { background-color: rgba($b_color, 0.3); }
536
}
537
538
.osd & {
539
}
540
}
541
}
542
543
.stack-switcher > & {
544
// to position the needs attention dot, padding is added to the button
545
// child, a label needs just lateral padding while an icon needs vertical
546
// padding added too.
547
548
outline-offset: -4px; // needs to be set or it gets overriden by GtkRadioButton outline-offset
549
550
> label {
551
padding-left: 6px; // label padding
552
padding-right: 6px; //
553
}
554
555
> image {
556
padding-left: 6px; // image padding
557
padding-right: 6px; //
558
padding-top: 3px; //
559
padding-bottom: 3px; //
560
}
561
562
&.text-button {
563
// compensate text-button paddings
564
padding-left: 16px - 6px;
565
padding-right: 16px - 6px;
566
}
567
568
&.image-button {
569
// we want image buttons to have a 1:1 aspect ratio, so compensation
570
// of the padding added to the GtkImage is needed
571
padding-left: ($medium_size - 16px) / 2 - 6px;
572
padding-right: ($medium_size - 16px) / 2 - 6px;
573
}
574
575
&.needs-attention {
576
> label,
577
> image { @extend %needs_attention; }
578
579
&:checked {
580
> label,
581
> image {
582
animation: none;
583
background-image: none;
584
}
585
}
586
}
587
}
588
589
// hide separators
590
&.font,
591
&.file { separator { @extend %hide_separators; }}
592
593
// &.font { > box > box > label { font-weight: bold; }}
594
595
// inline-toolbar buttons
596
.inline-toolbar & {
597
// @extend %button_basic.flat;
598
599
&:not(.text-button) { @extend %circular_button; }
600
}
601
602
.primary-toolbar & { -gtk-icon-shadow: none; } // tango icons don't need shadows
603
604
@at-root %circular_button,
605
&.close,
606
&.circular { // The Bloody Circul Button
607
border-radius: $circular_radius;
608
-gtk-outline-radius: $circular_radius;
609
610
// label { padding: 0; }
611
}
612
613
@at-root %small_button {
614
min-height: $small_size;
615
min-width: $small_size;
616
padding: 0;
617
border-radius: $circular_radius;
618
-gtk-outline-radius: $circular_radius;
619
}
620
}
621
622
%needs_attention {
623
animation: needs_attention $longer_duration $deceleration_curve forwards;
624
background-repeat: no-repeat;
625
background-position: right 3px;
626
background-size: 6px 6px;
627
628
&:dir(rtl) { background-position: left 3px; }
629
}
630
631
// all the following is for the +|- buttons on inline toolbars, that way
632
// should really be deprecated...
633
.inline-toolbar toolbutton > button { // redefining the button look is
634
// needed since those are flat...
635
}
636
637
// More inline toolbar buttons
638
toolbar.inline-toolbar toolbutton {
639
// > button.flat { @extend %linked_middle; }
640
641
// &:first-child > button.flat { @extend %linked:first-child; }
642
643
// &:last-child > button.flat { @extend %linked:last-child; }
644
645
// &:only-child > button.flat { @extend %linked:only-child; }
646
}
647
648
%linked_middle {
649
border-radius: 0;
650
-gtk-outline-radius: $material_radius;
651
}
652
653
%linked {
654
@extend %linked_middle;
655
656
&:first-child {
657
border-top-left-radius: $material_radius;
658
border-bottom-left-radius: $material_radius;
659
}
660
661
&:last-child {
662
border-top-right-radius: $material_radius;
663
border-bottom-right-radius: $material_radius;
664
}
665
666
&:only-child {
667
border-radius: $material_radius;
668
}
669
}
670
671
%linked_vertical_middle {
672
border-radius: 0;
673
-gtk-outline-radius: $material_radius;
674
}
675
676
%linked_vertical {
677
@extend %linked_vertical_middle;
678
679
&:first-child {
680
border-top-left-radius: $material_radius;
681
border-top-right-radius: $material_radius;
682
}
683
684
&:last-child {
685
border-bottom-left-radius: $material_radius;
686
border-bottom-right-radius: $material_radius;
687
}
688
689
&:only-child {
690
border-radius: $material_radius;
691
}
692
}
693
694
%linked_entry {
695
@extend %linked_middle;
696
697
&:first-child {
698
border-radius: $material_radius 0 0 0;
699
}
700
701
&:last-child {
702
border-radius: 0 $material_radius 0 0;
703
}
704
705
&:only-child {
706
border-radius: $material_radius $material_radius 0 0;
707
}
708
}
709
710
%linked_vertical_entry {
711
@extend %linked_vertical_middle;
712
713
&:first-child {
714
border-radius: $material_radius $material_radius 0 0;
715
}
716
717
&:last-child {
718
border-radius: 0;
719
}
720
721
&:only-child {
722
border-radius: $material_radius $material_radius 0 0;
723
}
724
}
725
726
/* menu buttons */
727
modelbutton.flat,
728
.menuitem.button.flat {
729
min-height: $menuitem_size;
730
padding: 0 8px;
731
border-radius: $material_radius;
732
color: inherit;
733
734
@extend %simple_flat_button;
735
736
&:selected { @extend %selected_items; }
737
}
738
739
modelbutton.flat arrow {
740
background: none;
741
742
&:hover { background: none; }
743
744
&.left { -gtk-icon-source: -gtk-icontheme("pan-start-symbolic"); }
745
746
&.right { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
747
}
748
749
button.color {
750
min-height: $small_size;
751
min-width: $small_size;
752
padding: $container_padding;
753
754
colorswatch:only-child {
755
// &, overlay { border-radius: 0; }
756
}
757
}
758
759
760
/*********
761
* Links *
762
*********/
763
*:link {
764
&, &:hover, &:active { color: $link_color; }
765
766
&:visited {
767
&, &:hover, &:active { color: $visited_link_color; }
768
}
769
770
@at-root %link_selected,
771
&:selected,
772
*:selected & { color: $inverse_fg_color; }
773
}
774
775
button:link,
776
button:visited {
777
@extend *:link;
778
779
> label { text-decoration-line: underline; }
780
}
781
782
/*****************
783
* GtkSpinButton *
784
*****************/
785
spinbutton {
786
&:not(.vertical) {
787
// in this horizontal configuration, the whole spinbutton
788
// behaves as the entry, so we extend the entry styling
789
// and nuke the style on the internal entry
790
@extend %entry;
791
792
padding: 0;
793
794
entry {
795
min-width: $large_size - 8px * 2;
796
// reset all the other props since the spinbutton node is styled here
797
margin: 0;
798
border-image: none;
799
border-radius: 0;
800
box-shadow: none;
801
background-color: transparent;
802
//
803
// This will help to simplify spinbutton's code, but unfortunatelly
804
// doesn't work properly in :dir(rtl). It needs z-index property.
805
//
806
// min-width: $large_size - 8px;
807
//
808
// $spinbuttons_width: $small_size * 2 + $container_padding * 3;
809
//
810
// &:dir(ltr) {
811
// margin-right: -$spinbuttons_width;
812
// padding-right: $spinbuttons_width;
813
// }
814
//
815
// &:dir(rtl) {
816
// margin-left: -$spinbuttons_width;
817
// padding-left: $spinbuttons_width;
818
// }
819
}
820
821
button {
822
// margin: $container_padding;
823
border: solid $container_padding transparent;
824
825
@extend %simple_flat_button;
826
827
@extend %small_button;
828
829
&.up:dir(ltr),
830
&.down:dir(rtl) { margin-left: -$container_padding / 2; }
831
832
&.up:dir(rtl),
833
&.down:dir(ltr) { margin-right: -$container_padding / 2; }
834
}
835
}
836
837
// OSD horizontal
838
.osd &:not(.vertical) {
839
button {
840
}
841
}
842
843
// Vertical
844
&.vertical {
845
// in the vertical configuration, we treat the spinbutton
846
// as a box, and tweak the style of the entry in the middle
847
// so that it's linked
848
849
// FIXME: this should not be set at all, but otherwise it gets the wrong
850
// color
851
&:disabled { color: $disabled_fg_color; }
852
853
&:drop(active) {
854
box-shadow: none;
855
}
856
857
entry {
858
@extend %entry_raised;
859
860
min-height: $medium_size;
861
min-width: $large_size;
862
padding: 0;
863
}
864
865
button {
866
min-height: $medium_size;
867
min-width: $large_size;
868
padding: 0;
869
870
@extend %simple_flat_button;
871
872
&.up { border-radius: $material_radius $material_radius 0 0; }
873
874
&.down { border-radius: 0 0 $material_radius $material_radius; }
875
}
876
}
877
878
// OSD vertical
879
.osd &.vertical button:first-child {
880
}
881
882
// Misc
883
treeview &:not(.vertical) {
884
min-height: 0;
885
border-style: none;
886
border-radius: 0;
887
888
entry {
889
min-height: 0;
890
padding: 1px 2px;
891
}
892
}
893
}
894
895
896
/**************
897
* ComboBoxes *
898
**************/
899
combobox {
900
arrow {
901
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
902
min-height: 16px;
903
min-width: 16px;
904
}
905
906
decoration,
907
button.combo:checked { transition: none; } // workaround for menuitem selection
908
909
button.combo cellview {
910
&:dir(ltr) { margin-left: 8px - ($medium_size - 16px) / 2; }
911
&:dir(rtl) { margin-right: 8px - ($medium_size - 16px) / 2; }
912
}
913
914
#gtk-combobox-popup-menu {
915
padding: 2px 0;
916
917
menuitem {
918
min-height: $medium_size - 2px * 2;
919
padding: 0 8px;
920
}
921
922
// overflow arrows
923
> arrow {
924
&.top { margin-top: -2px; }
925
926
&.bottom {
927
margin-top: 2px * 2;
928
margin-bottom: -2px * 3;
929
}
930
}
931
}
932
933
&.linked {
934
button:nth-child(2) {
935
&:dir(ltr) { @extend %linked_entry:last-child; }
936
&:dir(rtl) { @extend %linked_entry:first-child; }
937
}
938
}
939
940
> .linked > button {
941
@extend %linked_middle;
942
943
&:first-child { @extend %linked_entry:first-child; }
944
945
&:last-child { @extend %linked_entry:last-child; }
946
947
&:only-child { @extend %linked_entry:only-child; }
948
}
949
950
&:drop(active) { // FIXME: untested
951
box-shadow: none;
952
953
// button.combo { @extend %button_basic:drop(active); }
954
}
955
}
956
957
// the combo is a composite widget so the way we do button linking doesn't
958
// work, special case needed. See
959
// https://bugzilla.gnome.org/show_bug.cgi?id=733979
960
961
.linked:not(.vertical) > combobox {
962
> box > button.combo { @extend %linked_middle; }
963
964
&:first-child > box > button.combo { @extend %linked_entry:first-child; }
965
966
&:last-child > box > button.combo { @extend %linked_entry:last-child; }
967
968
&:only-child > box > button.combo { @extend %linked_entry:only-child; }
969
}
970
971
.linked.vertical > combobox {
972
> box > button.combo { @extend %linked_vertical_middle; }
973
974
&:first-child > box > button.combo { @extend %linked_vertical_entry:first-child; }
975
976
&:last-child > box > button.combo { @extend %linked_vertical_entry:last-child; }
977
978
&:only-child > box > button.combo { @extend %linked_vertical_entry:only-child; }
979
}
980
981
button.combo {
982
border-radius: $material_radius $material_radius 0 0;
983
background-image: none;
984
font-weight: inherit;
985
986
@include entry(normal);
987
988
&:hover { box-shadow: inset 0 -1px $fg_color; }
989
990
&:checked { @include entry(focus); }
991
992
&:disabled { @include entry(disabled); }
993
}
994
995
996
/************
997
* Toolbars *
998
************/
999
toolbar {
1000
-GtkWidget-window-dragging: true;
1001
padding: 2px;
1002
background-color: $bg_color;
1003
1004
button { @extend %button_basic.flat; }
1005
1006
// on OSD
1007
.osd & { background-color: transparent; }
1008
1009
// stand-alone OSD toolbars
1010
&.osd {
1011
transition: $shadow_transition;
1012
padding: $container_padding;
1013
border-radius: $material_radius;
1014
box-shadow: $shadow_2, inset 0 1px $highlight_color;
1015
background-color: $popup_bg_color;
1016
1017
&:backdrop { box-shadow: $shadow_1, inset 0 1px $highlight_color; }
1018
1019
&.left,
1020
&.right,
1021
&.top,
1022
&.bottom { border-radius: 0; } // positional classes for `attached` osd toolbars
1023
}
1024
1025
// toolbar separators
1026
&.horizontal > separator { margin: 2px; }
1027
&.vertical > separator { margin: 2px; }
1028
1029
&:not(.inline-toolbar):not(.osd) {
1030
scale,
1031
entry,
1032
spinbutton,
1033
button { margin: 2px; }
1034
1035
.linked entry,
1036
.linked spinbutton,
1037
.linked button {
1038
&:not(:first-child) { margin-left: 0; }
1039
&:not(:last-child) { margin-right: 0; }
1040
}
1041
1042
spinbutton {
1043
entry,
1044
button { margin: 0; }
1045
}
1046
1047
switch { margin: 2px + $container_padding 2px; }
1048
}
1049
}
1050
1051
// searchbar, location-bar & inline-toolbar
1052
.inline-toolbar {
1053
padding: $container_padding;
1054
border-style: solid;
1055
border-width: 0 1px 1px;
1056
border-color: $border_color;
1057
background-color: $alt_base_color;
1058
}
1059
1060
searchbar > revealer > box,
1061
.location-bar {
1062
padding: $container_padding;
1063
border-style: solid;
1064
border-width: 0 0 1px;
1065
border-color: $border_color;
1066
background-color: $bg_color;
1067
background-clip: border-box;
1068
}
1069
1070
searchbar > revealer > box {
1071
// workaround: undo the GtkContainer:border-width and use CSS padding instead
1072
margin: -6px;
1073
padding: $container_padding;
1074
}
1075
1076
1077
/***************
1078
* Header bars *
1079
***************/
1080
%titlebar,
1081
headerbar {
1082
transition: background-color $shorter_duration $deceleration_curve, color $shorter_duration $deceleration_curve;
1083
min-height: $large_size;
1084
padding: 0 $container_padding;
1085
box-shadow: $shadow_1, inset 0 1px $titlebar_highlight_color;
1086
background-color: $titlebar_bg_color;
1087
color: $titlebar_fg_color;
1088
1089
&:disabled { color: $titlebar_disabled_fg_color; }
1090
1091
&:backdrop {
1092
color: $titlebar_secondary_fg_color;
1093
1094
&:disabled { color: $titlebar_disabled_secondary_fg_color; }
1095
}
1096
1097
.title {
1098
padding: 0 12px;
1099
font-weight: bold;
1100
}
1101
1102
.subtitle {
1103
padding: 0 12px;
1104
font-size: smaller;
1105
1106
@extend .dim-label;
1107
}
1108
1109
.linked:not(.vertical) > entry:not(.flat) { border-radius: $material_radius; }
1110
1111
button:not(.suggested-action):not(.destructive-action) {
1112
@extend %button_basic.flat;
1113
1114
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1115
$titlebar_indicator_color 0%,
1116
transparent 0%)
1117
0 0 0 / 0 0 0px;
1118
color: $titlebar_secondary_fg_color;
1119
1120
&:hover, &:active { color: $titlebar_fg_color; }
1121
1122
&:disabled { color: $titlebar_disabled_secondary_fg_color; }
1123
1124
&:checked {
1125
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1126
$titlebar_indicator_color 100%,
1127
transparent 0%)
1128
0 0 2 / 0 0 2px;
1129
color: $titlebar_fg_color;
1130
1131
&:disabled { color: $titlebar_disabled_fg_color; }
1132
1133
&, &:disabled { background-color: transparent; }
1134
}
1135
1136
&:backdrop {
1137
color: $titlebar_disabled_fg_color;
1138
1139
&:hover, &:active { color: $titlebar_secondary_fg_color; }
1140
1141
&:disabled { color: $titlebar_disabled_secondary_fg_color; }
1142
1143
&:checked {
1144
color: $titlebar_secondary_fg_color;
1145
1146
&:disabled { color: $titlebar_disabled_secondary_fg_color; }
1147
}
1148
}
1149
}
1150
1151
button.suggested-action, button.destructive-action {
1152
&:disabled {
1153
background-color: $titlebar_divider_color;
1154
color: $titlebar_disabled_fg_color;
1155
}
1156
}
1157
1158
&.selection-mode {
1159
// 0.00001s was a workaround for https://gitlab.gnome.org/GNOME/gtk/issues/698
1160
// but let's keep it for backwards compatibility.
1161
transition: background-color 0.00001s $longer_duration, color $longer_duration $deceleration_curve;
1162
animation: header_ripple_effect $longer_duration $deceleration_curve;
1163
box-shadow: $shadow_1, inset 0 1px $alt_highlight_color;
1164
background-color: $primary_color;
1165
color: $inverse_fg_color;
1166
1167
&:backdrop {
1168
color: $inverse_secondary_fg_color;
1169
}
1170
1171
.subtitle:link { @extend *:link:selected; }
1172
1173
button:not(.suggested-action):not(.destructive-action) {
1174
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1175
currentColor 0%,
1176
transparent 0%)
1177
0 0 0 / 0 0 0px;
1178
color: $inverse_fg_color;
1179
1180
&:disabled { color: $inverse_disabled_fg_color; }
1181
1182
&:checked {
1183
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1184
currentColor 100%,
1185
transparent 0%)
1186
0 0 2 / 0 0 2px;
1187
color: $inverse_fg_color;
1188
1189
&:disabled { color: $inverse_disabled_fg_color; }
1190
}
1191
1192
&:backdrop {
1193
color: $inverse_secondary_fg_color;
1194
1195
&:disabled { color: $inverse_disabled_secondary_fg_color; }
1196
1197
&:checked {
1198
color: $inverse_secondary_fg_color;
1199
1200
&:disabled { color: $inverse_disabled_secondary_fg_color; }
1201
}
1202
}
1203
}
1204
1205
.selection-menu {
1206
padding-left: 16px;
1207
padding-right: 16px;
1208
1209
arrow { -GtkArrow-arrow-scaling: 1; }
1210
1211
.arrow { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
1212
}
1213
}
1214
1215
// squared corners when the window is maximized, tiled, or fullscreen
1216
.tiled &,
1217
.tiled-top &,
1218
.tiled-right &,
1219
.tiled-bottom &,
1220
.tiled-left &,
1221
.maximized &,
1222
.fullscreen & {
1223
border-radius: 0;
1224
box-shadow: $shadow_1;
1225
}
1226
1227
&.default-decoration {
1228
min-height: $small_size;
1229
padding: $container_padding;
1230
box-shadow: inset 0 1px $titlebar_highlight_color;
1231
1232
.tiled &,
1233
.maximized &,
1234
.fullscreen & { box-shadow: none; }
1235
1236
button.titlebutton {
1237
min-height: $small_size;
1238
min-width: $small_size;
1239
margin: 0;
1240
padding: 0;
1241
}
1242
1243
// workaround for non-animatable buttons
1244
.background:not(.csd) & button.titlebutton:active { background-size: 1000% 1000%; }
1245
}
1246
1247
.solid-csd & {
1248
&:dir(rtl), &:dir(ltr) { // specificity bump
1249
// margin-left: -2px;
1250
// margin-right: -2px;
1251
// margin-top: -2px;
1252
// border-radius: 0;
1253
// box-shadow: inset 0 1px $titlebar_highlight_color;
1254
}
1255
}
1256
}
1257
1258
headerbar {
1259
// add vertical margins to common widget on the headerbar to avoid them spanning the whole height
1260
entry,
1261
spinbutton,
1262
// separator,
1263
button {
1264
margin-top: $container_padding;
1265
margin-bottom: $container_padding;
1266
}
1267
1268
switch {
1269
margin-top: ($large_size - 24px) / 2;
1270
margin-bottom: ($large_size - 24px) / 2;
1271
}
1272
1273
// reset button margins of the spinbutton
1274
spinbutton button {
1275
margin-top: 0;
1276
margin-bottom: 0;
1277
}
1278
1279
// FIXME: This is a hacky workaround.
1280
.entry-tag {
1281
margin-top: 5px;
1282
margin-bottom: 5px;
1283
}
1284
}
1285
1286
.background .titlebar {
1287
border-top-left-radius: $material_radius;
1288
border-top-right-radius: $material_radius;
1289
}
1290
1291
.background.tiled .titlebar,
1292
.background.tiled-top .titlebar,
1293
.background.tiled-right .titlebar,
1294
.background.tiled-bottom .titlebar,
1295
.background.tiled-left .titlebar,
1296
.background.maximized .titlebar,
1297
.background.solid-csd .titlebar {
1298
border-top-left-radius: 0;
1299
border-top-right-radius: 0;
1300
}
1301
1302
headerbar { // headerbar border rounding
1303
window separator:first-child + &, // tackles the paned container case
1304
window &:first-child { border-top-left-radius: $material_radius; }
1305
1306
window &:last-child { border-top-right-radius: $material_radius; }
1307
1308
window stack & { // tackles the stacked headerbars case
1309
&:first-child, &:last-child {
1310
border-top-left-radius: $material_radius;
1311
border-top-right-radius: $material_radius;
1312
}
1313
}
1314
1315
window.tiled &,
1316
window.tiled-top &,
1317
window.tiled-right &,
1318
window.tiled-bottom &,
1319
window.tiled-left &,
1320
window.maximized &,
1321
window.fullscreen &,
1322
window.solid-csd & {
1323
&,
1324
&:first-child,
1325
&:last-child,
1326
&:only-child {
1327
border-top-left-radius: 0;
1328
border-top-right-radius: 0;
1329
}
1330
}
1331
}
1332
1333
.titlebar:not(headerbar) {
1334
window.csd > & {
1335
// in csd we assume every titlebar is a headerbar so reset anything, this is needed for split toolbars cases
1336
padding: 0;
1337
background-color: transparent;
1338
background-image: none;
1339
border-style: none;
1340
box-shadow: none;
1341
}
1342
1343
> separator {
1344
background-color: $titlebar_bg_color;
1345
background-image: image($border_color);
1346
}
1347
1348
@extend %titlebar;
1349
}
1350
1351
1352
/************
1353
* Pathbars *
1354
************/
1355
%pathbar_button,
1356
.path-bar button {
1357
padding-left: ($medium_size - 24px) / 2;
1358
padding-right: ($medium_size - 24px) / 2;
1359
1360
label:not(:only-child) {
1361
&:first-child { margin-left: 4px; }
1362
1363
&:last-child { margin-right: 4px; }
1364
}
1365
1366
&.slider-button {
1367
padding-left: (24px - 16px) / 2;
1368
padding-right: (24px - 16px) / 2;
1369
}
1370
1371
:not(headerbar) & {
1372
@extend %flat_button;
1373
1374
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1375
$primary_color 0%,
1376
transparent 0%)
1377
0 0 0 / 0 0 0px;
1378
border-radius: $material_radius;
1379
1380
&:checked {
1381
border-image: radial-gradient(circle closest-corner at center calc(100% - 1px),
1382
$primary_color 100%,
1383
transparent 0%)
1384
0 0 2 / 0 0 2px;
1385
1386
&, &:disabled { background-color: transparent; }
1387
}
1388
}
1389
}
1390
1391
1392
/**************
1393
* Tree Views *
1394
**************/
1395
treeview.view {
1396
@at-root * {
1397
-GtkTreeView-horizontal-separator: 4;
1398
-GtkTreeView-grid-line-width: 1;
1399
-GtkTreeView-grid-line-pattern: '';
1400
-GtkTreeView-tree-line-width: 1;
1401
-GtkTreeView-tree-line-pattern: '';
1402
-GtkTreeView-expander-size: 16;
1403
}
1404
1405
border-left-color: $track_color; // this is actually the tree lines color,
1406
border-top-color: $border_color; // while this is the grid lines color, better then nothing
1407
1408
&:selected { border-left-color: $inverse_track_color; }
1409
1410
rubberband { @extend rubberband; } // to avoid borders being overridden by the previously set props
1411
1412
&:hover, &:active, &:selected { border-radius: 0; }
1413
1414
&.separator {
1415
min-height: 1px + 2px * 2;
1416
color: $border_color;
1417
}
1418
1419
&:drop(active) {
1420
border-style: solid none;
1421
border-width: 1px;
1422
border-color: $primary_color;
1423
1424
&.after { border-top-style: none; }
1425
1426
&.before { border-bottom-style: none; }
1427
}
1428
1429
&.expander {
1430
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
1431
-gtk-icon-transform: rotate(-90deg);
1432
1433
&:dir(rtl) { -gtk-icon-transform: rotate(90deg); }
1434
1435
&:checked { -gtk-icon-transform: unset; }
1436
1437
color: $secondary_fg_color;
1438
1439
&:hover, &:active { color: $fg_color; }
1440
1441
&:disabled { color: $disabled_secondary_fg_color; }
1442
1443
&:selected {
1444
color: $inverse_secondary_fg_color;
1445
1446
&:hover, &:active { color: $inverse_fg_color; }
1447
1448
&:disabled { color: $inverse_disabled_secondary_fg_color; }
1449
}
1450
}
1451
1452
&.progressbar { // progress bar in treeviews
1453
border-bottom: $bar_size solid $primary_color;
1454
box-shadow: none;
1455
background-color: transparent;
1456
1457
&:selected { border-bottom-color: $inverse_fg_color; }
1458
}
1459
1460
&.trough { // progress bar trough in treeviews
1461
border-bottom: $bar_size solid $divider_color;
1462
box-shadow: none;
1463
background-color: transparent;
1464
1465
&:selected { border-bottom-color: $inverse_divider_color; }
1466
}
1467
1468
header {
1469
button {
1470
@extend row.activatable;
1471
1472
padding: 2px 6px;
1473
border-style: none solid solid none;
1474
border-width: 1px;
1475
border-color: $border_color;
1476
border-radius: 0;
1477
background-clip: border-box;
1478
1479
&, &:hover, &:active { box-shadow: none; }
1480
1481
&, &:disabled { background-color: $base_color; }
1482
1483
&:last-child { border-right-style: none; }
1484
}
1485
}
1486
1487
button.dnd,
1488
header.button.dnd { // for treeview-like derive widgets
1489
padding: 2px 6px;
1490
border-style: none solid solid;
1491
border-width: 1px;
1492
border-color: $border_color;
1493
border-radius: 0;
1494
box-shadow: none;
1495
background-color: $base_color;
1496
background-clip: border-box;
1497
color: $primary_color;
1498
}
1499
1500
acceleditor > label { background-color: $primary_color; } // see tests/testaccel to test
1501
}
1502
1503
1504
/*********
1505
* Menus *
1506
*********/
1507
menubar,
1508
.menubar {
1509
-GtkWidget-window-dragging: true;
1510
padding: 0;
1511
// box-shadow: inset 0 -1px $border_color;
1512
background-color: $titlebar_bg_color;
1513
1514
> menuitem {
1515
transition: $shorter_transition;
1516
min-height: 20px;
1517
padding: 4px 8px;
1518
color: $titlebar_secondary_fg_color;
1519
1520
&:hover { // Seems like it :hover even with keyboard focus
1521
transition: none;
1522
background-color: $titlebar_divider_color;
1523
color: $titlebar_fg_color;
1524
}
1525
1526
&:disabled { color: $titlebar_disabled_secondary_fg_color; }
1527
1528
label:disabled { color: inherit; } // to inherit the above color
1529
}
1530
}
1531
1532
.csd.popup { background-color: transparent; }
1533
1534
menu,
1535
.menu,
1536
.context-menu {
1537
margin: 4px 0; // See https://bugzilla.gnome.org/show_bug.cgi?id=591258
1538
padding: 4px 0;
1539
box-shadow: inset 0 1px $highlight_color;
1540
background-color: $popup_bg_color;
1541
border: 1px solid $border_color; // adds borders in a non composited env
1542
1543
.csd & {
1544
border: none; // axes borders in a composited env
1545
border-radius: $material_radius;
1546
}
1547
1548
menuitem {
1549
transition: background-color $shorter_duration $deceleration_curve;
1550
min-height: 20px;
1551
min-width: 40px;
1552
padding: 4px 8px;
1553
font: initial;
1554
text-shadow: none;
1555
1556
&:hover {
1557
transition: none;
1558
background-color: $divider_color;
1559
}
1560
1561
&:disabled { color: $disabled_fg_color; }
1562
1563
// submenu indicators
1564
arrow {
1565
min-height: 16px;
1566
min-width: 16px;
1567
1568
&:dir(ltr) {
1569
-gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
1570
margin-left: 8px;
1571
}
1572
1573
&:dir(rtl) {
1574
-gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl');
1575
margin-right: 8px;
1576
}
1577
}
1578
1579
// avoids labels color being overridden, see
1580
// https://bugzilla.gnome.org/show_bug.cgi?id=767058
1581
label { &:dir(rtl), &:dir(ltr) { color: inherit; }}
1582
}
1583
1584
// overflow arrows
1585
> arrow {
1586
min-height: 16px;
1587
min-width: 16px;
1588
padding: 4px;
1589
background-color: $popup_bg_color;
1590
color: $secondary_fg_color;
1591
1592
&.top {
1593
margin-top: -4px;
1594
border-bottom: 1px solid $border_color;
1595
border-radius: $material_radius $material_radius 0 0;
1596
-gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
1597
}
1598
1599
&.bottom {
1600
margin-top: 4px * 2;
1601
margin-bottom: -4px * 3;
1602
border-top: 1px solid $border_color;
1603
border-radius: 0 0 $material_radius $material_radius;
1604
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
1605
}
1606
1607
&:hover {
1608
background-image: image($divider_color);
1609
color: $fg_color;
1610
}
1611
1612
&:disabled {
1613
border-color: transparent;
1614
background-color: transparent;
1615
color: transparent;
1616
// color: $disabled_secondary_fg_color;
1617
}
1618
}
1619
1620
separator { margin: 4px 0; }
1621
}
1622
1623
menuitem {
1624
accelerator { color: $secondary_fg_color; }
1625
1626
&:disabled accelerator { color: $disabled_secondary_fg_color; }
1627
}
1628
1629
// FIXME: THIS IS A REALLY UGLY WORKAROUND!
1630
// Electron/Atom render all translucent colors in opaque colors.
1631
// It's a very critical issue for this theme and should be fixed by upstream...
1632
.popup:not(.csd) menu {
1633
menuitem {
1634
color: $opaque_fg_color;
1635
1636
&:hover { background-color: $opaque_divider_color; }
1637
1638
&:disabled { color: $opaque_disabled_fg_color; } // separator/border also use this color.
1639
}
1640
1641
// FIXME: not working this
1642
accelerator { color: $opaque_secondary_fg_color; }
1643
}
1644
1645
1646
/************
1647
* Popovers *
1648
************/
1649
popover.background {
1650
transition: $shadow_transition;
1651
padding: 2px;
1652
box-shadow: $shadow_2; // TODO: this should really have a highlight
1653
background-color: $popup_bg_color;
1654
1655
&:backdrop { box-shadow: $shadow_1; }
1656
1657
&, .csd & {
1658
border-style: solid;
1659
border-width: 1px;
1660
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.3);
1661
border-radius: $material_radius + 1px;
1662
}
1663
1664
> stack { margin: -4px; } // remove extra padding from menu style popovers
1665
1666
> toolbar { margin: -2px; }
1667
1668
> list,
1669
> .view,
1670
> toolbar {
1671
border-style: none;
1672
box-shadow: none;
1673
background-color: transparent;
1674
}
1675
1676
// FIXME: Use the popover color instead of transparent as a workaround for .view
1677
list,
1678
.view:not(:selected),
1679
toolbar { background-color: $popup_bg_color; }
1680
1681
// &.touch-selection,
1682
// &.magnifier,
1683
// &.osd { @extend %osd; }
1684
1685
// button:not(.suggested-action):not(.destructive-action) { @extend %button_basic.flat; }
1686
1687
&.menu button,
1688
button.model {
1689
@extend %simple_flat_button;
1690
1691
min-height: 32px;
1692
padding: 0 8px;
1693
border-radius: $material_radius;
1694
1695
&:checked { @extend %selected_items; }
1696
}
1697
1698
separator { margin: 4px 0; }
1699
1700
list separator { margin: 0; }
1701
}
1702
1703
/*************
1704
* Notebooks *
1705
*************/
1706
notebook {
1707
frame > paned > & > header,
1708
&.frame > header { background-color: $alt_base_color; }
1709
1710
> header {
1711
border-width: 1px;
1712
border-color: $border_color;
1713
background-color: $bg_color;
1714
background-clip: border-box;
1715
1716
&.top {
1717
border-bottom-style: solid;
1718
1719
> tabs {
1720
margin-bottom: -1px;
1721
1722
> tab {
1723
box-shadow: inset 0 -2px transparent;
1724
1725
&:checked { box-shadow: inset 0 -2px $primary_color; }
1726
}
1727
}
1728
}
1729
1730
&.bottom {
1731
border-top-style: solid;
1732
1733
> tabs {
1734
margin-top: -1px;
1735
1736
> tab {
1737
box-shadow: inset 0 2px transparent;
1738
1739
&:checked { box-shadow: inset 0 2px $primary_color; }
1740
}
1741
}
1742
}
1743
1744
&.left {
1745
border-right-style: solid;
1746
1747
> tabs {
1748
margin-right: -1px;
1749
1750
> tab {
1751
box-shadow: inset -2px 0 transparent;
1752
1753
&:checked { box-shadow: inset -2px 0 $primary_color; }
1754
}
1755
}
1756
}
1757
1758
&.right {
1759
border-left-style: solid;
1760
1761
> tabs {
1762
margin-left: -1px;
1763
1764
> tab {
1765
box-shadow: inset 2px 0 transparent;
1766
1767
&:checked { box-shadow: inset 2px 0 $primary_color; }
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_bg_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: $popup_bg_color;
2091
}
2092
2093
&:hover slider { box-shadow: 0 0 0 10px $hover_bg_color, $shadow_1; }
2094
2095
&:focus slider { box-shadow: 0 0 0 10px $focus_bg_color, $shadow_1; }
2096
2097
&:focus:hover slider { box-shadow: 0 0 0 10px $hover_focus_bg_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_bg_color; }
2165
2166
&:focus { box-shadow: inset 0 0 0 9999px $focus_bg_color; }
2167
2168
&:focus:hover { box-shadow: inset 0 0 0 9999px $hover_focus_bg_color; }
2169
2170
&:checked, &:indeterminate {
2171
color: $primary_color;
2172
2173
&:disabled { color: $disabled_primary_color; }
2174
}
2175
2176
// &:only-child { margin: -12px; }
2177
2178
row:selected &:not(:checked):not(:indeterminate) {
2179
color: $inverse_secondary_fg_color;
2180
2181
&:hover, &:active { color: $inverse_fg_color; }
2182
2183
&:disabled { color: $inverse_disabled_secondary_fg_color; }
2184
}
2185
2186
popover & {
2187
&, &:hover, &:focus, &:focus:hover, &:active, &:disabled {
2188
transition: none; // FIXME: this is a workaround for a popover check/radio long transition issue
2189
box-shadow: none;
2190
background-image: none;
2191
}
2192
2193
&:not(:checked):not(:indeterminate):not(:disabled) { color: $secondary_fg_color; }
2194
2195
&.left:dir(rtl) {
2196
margin-left: -12px;
2197
margin-right: -4px;
2198
}
2199
2200
&.right:dir(ltr) {
2201
margin-left: -4px;
2202
margin-right: -12px;
2203
}
2204
}
2205
2206
menu menuitem & {
2207
transition: none;
2208
margin: 0; // this is a workaround for a menu check/radio size allocation issue
2209
padding: 0;
2210
2211
&:dir(ltr) { margin-right: 8px; }
2212
2213
&:dir(rtl) { margin-left: 8px; }
2214
2215
&:not(:checked):not(:indeterminate):not(:disabled) { color: $secondary_fg_color; }
2216
2217
&, &:hover, &:disabled {
2218
box-shadow: none;
2219
// color: inherit;
2220
}
2221
}
2222
}
2223
2224
%check,
2225
check {
2226
-gtk-icon-source: -gtk-recolor(url("assets/scalable/checkbox-unchecked-symbolic.svg"));
2227
2228
&:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/checkbox-checked-symbolic.svg")); }
2229
2230
&:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/checkbox-mixed-symbolic.svg")); }
2231
}
2232
2233
%radio,
2234
radio {
2235
-gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-unchecked-symbolic.svg"));
2236
2237
// &:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-checked-symbolic.svg")); }
2238
2239
&:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-mixed-symbolic.svg")); }
2240
2241
border-image-slice: $check_radio_size / 2px;
2242
border-image-width: $check_radio_size / 2;
2243
2244
$radio_indicator: 10px / $check_radio_size / 2;
2245
2246
& {
2247
border-image-source: -gtk-gradient(radial,
2248
center center, 0,
2249
center center, 0.001,
2250
to($primary_color),
2251
to(transparent));
2252
}
2253
2254
&:checked:not(:indeterminate) {
2255
border-image-source: -gtk-gradient(radial,
2256
center center, 0,
2257
center center, $radio_indicator,
2258
to($primary_color),
2259
to(transparent));
2260
}
2261
2262
&:checked:not(:indeterminate):disabled {
2263
border-image-source: -gtk-gradient(radial,
2264
center center, 0,
2265
center center, $radio_indicator,
2266
to($disabled_primary_color),
2267
to(transparent));
2268
}
2269
}
2270
2271
%small_check,
2272
menu menuitem check {
2273
& {
2274
min-height: 16px;
2275
min-width: 16px;
2276
border-radius: $material_radius;
2277
-gtk-outline-radius: $material_radius;
2278
-gtk-icon-source: -gtk-recolor(url("assets/scalable/small-checkbox-unchecked-symbolic.svg"));
2279
}
2280
2281
&:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/small-checkbox-checked-symbolic.svg")); }
2282
2283
&:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/small-checkbox-mixed-symbolic.svg")); }
2284
}
2285
2286
%small_radio,
2287
menu menuitem radio {
2288
& {
2289
min-height: 16px;
2290
min-width: 16px;
2291
border-image: none;
2292
-gtk-icon-source: -gtk-recolor(url("assets/scalable/small-radio-unchecked-symbolic.svg"));
2293
}
2294
2295
&:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/small-radio-checked-symbolic.svg")); }
2296
2297
&:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/small-radio-mixed-symbolic.svg")); }
2298
}
2299
2300
// ANIMATION:
2301
// this is made with those pretty convoluted transitions, since checks and radios have to animate only on state changes,
2302
// the transformation is set on the active state and it get reset on the checked state.
2303
// radio:not(:checked):active { -gtk-icon-transform: scale(0); }
2304
2305
treeview.view check,
2306
treeview.view radio {
2307
padding: 0;
2308
2309
&:hover {
2310
box-shadow: inset 0 0 0 9999px gtkalpha($fg_color, 0.08);
2311
2312
&:disabled { box-shadow: none; }
2313
2314
&:selected { box-shadow: inset 0 0 0 9999px gtkalpha($inverse_fg_color, 0.08); }
2315
}
2316
2317
& {
2318
color: $secondary_fg_color;
2319
2320
&:hover, &:active { color: $fg_color; }
2321
2322
&:disabled { color: $disabled_secondary_fg_color; }
2323
2324
&:checked, &:indeterminate { color: $primary_color; }
2325
2326
&:checked:disabled, &:indeterminate:disabled { color: $disabled_primary_color; }
2327
}
2328
2329
&:selected {
2330
color: $inverse_secondary_fg_color;
2331
2332
&:hover, &:active { color: $inverse_fg_color; }
2333
2334
&:disabled { color: $inverse_disabled_secondary_fg_color; }
2335
2336
&:checked, &:indeterminate { color: $primary_color; }
2337
2338
&:checked:disabled, &:indeterminate:disabled { color: $disabled_primary_color; }
2339
}
2340
}
2341
2342
treeview.view radio:checked {
2343
-gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-checked-symbolic.svg"));
2344
border-image: none;
2345
}
2346
2347
2348
/************
2349
* GtkScale *
2350
************/
2351
scale {
2352
// sizing
2353
$_marks_length: 8px;
2354
$_marks_distance: 7px;
2355
2356
$trough_size: 2px;
2357
$finetune_trough_size: 4px;
2358
2359
$slider_size: 32px;
2360
2361
$slider_margin: -($slider_size - $trough_size) / 2;
2362
$finetune_slider_margin: -($slider_size - $finetune_trough_size) / 2;
2363
2364
$color_slider_margin: -($slider_size) * 3 / 4;
2365
$color_marks_slider_margin: -($slider_size - 16px) - $color_slider_margin;
2366
2367
min-height: $trough_size;
2368
min-width: $trough_size;
2369
2370
&.horizontal { padding: ($medium_size - $trough_size) / 2 12px; }
2371
2372
&.vertical { padding: 12px ($medium_size - $trough_size) / 2; }
2373
2374
// the slider is inside the trough, so to have make it bigger there's a negative margin
2375
slider {
2376
min-height: $slider_size;
2377
min-width: $slider_size;
2378
margin: $slider_margin;
2379
}
2380
2381
// click-and-hold the slider to activate
2382
&.fine-tune {
2383
&.horizontal {
2384
min-height: $finetune_trough_size;
2385
padding-top: ($medium_size - $finetune_trough_size) / 2;
2386
padding-bottom: ($medium_size - $finetune_trough_size) / 2;
2387
}
2388
2389
&.vertical {
2390
min-width: $finetune_trough_size;
2391
padding-left: ($medium_size - $finetune_trough_size) / 2;
2392
padding-right: ($medium_size - $finetune_trough_size) / 2;
2393
}
2394
2395
// to make the trough grow in fine-tune mode
2396
slider { margin: $finetune_slider_margin; }
2397
}
2398
2399
// the backing bit
2400
trough {
2401
transition: background-color $shorter_duration $deceleration_curve;
2402
outline: none;
2403
background-color: $track_color;
2404
2405
&:disabled { background-color: $divider_color; }
2406
}
2407
2408
// the colored part of the backing bit
2409
highlight {
2410
transition: background-color $shorter_duration $deceleration_curve;
2411
background-color: $primary_color;
2412
2413
&:disabled { background-color: transparent; }
2414
}
2415
2416
// this is another differently styled part of the backing bit, the most relevant use case is for example
2417
// in media player to indicate how much video stream as been cached
2418
fill {
2419
transition: background-color $shorter_duration $deceleration_curve;
2420
background-color: $track_color;
2421
2422
&:disabled { background-color: transparent; }
2423
}
2424
2425
slider {
2426
transition: background-color $shorter_duration $deceleration_curve,
2427
background-size $ripple_duration $deceleration_curve,
2428
background-image $ripple_opacity_duration $deceleration_curve;
2429
background-repeat: no-repeat;
2430
background-position: center;
2431
background-size: auto, 1000% 1000%;
2432
border-radius: 50%;
2433
color: transparent;
2434
2435
@each $s, $as in ('', ''),
2436
(':disabled', '-disabled') {
2437
&#{$s} {
2438
$_url: 'assets/scale-slider#{$as}#{$asset_suffix}';
2439
2440
background-image: -gtk-scaled(url('#{$_url}.png'), url('#{$_url}@2.png')),
2441
radial-gradient(circle farthest-corner at center,
2442
currentColor 10%,
2443
transparent 0%);
2444
}
2445
}
2446
2447
&:hover { background-color: rgba($primary_color, 0.08); }
2448
2449
&:focus { background-color: rgba($primary_color, 0.12); }
2450
2451
&:focus:hover { background-color: rgba($primary_color, 0.16); }
2452
2453
&:active {
2454
transition: background-color $shorter_duration $deceleration_curve,
2455
background-size 0,
2456
background-image 0;
2457
animation: scale_ripple_effect $longer_duration $deceleration_curve forwards;
2458
background-size: auto, 0% 0%;
2459
background-color: rgba($primary_color, 0.08);
2460
color: rgba($primary_color, 0.12);
2461
}
2462
}
2463
2464
marks label,
2465
value { color: $secondary_fg_color; }
2466
2467
marks {
2468
color: $track_color;
2469
2470
@each $marks_class, $marks_pos, $marks_margin in (top, top, bottom),
2471
(bottom, bottom, top),
2472
(left, left, right),
2473
(right, right, left) {
2474
&.#{$marks_class} {
2475
margin-#{$marks_margin}: $_marks_distance;
2476
margin-#{$marks_pos}: -($_marks_distance + $_marks_length);
2477
}
2478
}
2479
}
2480
2481
&.fine-tune marks {
2482
@each $marks_class, $marks_pos, $marks_margin in (top, top, bottom),
2483
(bottom, bottom, top),
2484
(left, left, right),
2485
(right, right, left) {
2486
&.#{$marks_class} {
2487
margin-#{$marks_margin}: $_marks_distance - 1px;
2488
margin-#{$marks_pos}: -($_marks_distance + $_marks_length - 1px);
2489
}
2490
}
2491
}
2492
2493
&.horizontal {
2494
indicator {
2495
min-height: $_marks_length;
2496
min-width: 1px;
2497
}
2498
}
2499
2500
&.vertical {
2501
indicator {
2502
min-height: 1px;
2503
min-width: $_marks_length;
2504
}
2505
}
2506
2507
// *WARNING* scale with marks madness following
2508
2509
@each $dir_class, $dir_infix in ('horizontal', 'horz'),
2510
('vertical', 'vert') {
2511
@each $marks_infix, $marks_class in ('marks-before', 'marks-before:not(.marks-after)'),
2512
('marks-after', 'marks-after:not(.marks-before)') {
2513
&.#{$dir_class}.#{$marks_class} {
2514
slider {
2515
@each $state, $state_infix in ('', ''),
2516
(':disabled', '-disabled') {
2517
&#{$state} {
2518
$_scale_asset: 'assets/scale-#{$dir_infix}-#{$marks_infix}-slider#{$state_infix}#{$asset_suffix}';
2519
2520
background-image: -gtk-scaled(url('#{$_scale_asset}.png'), url('#{$_scale_asset}@2.png')),
2521
radial-gradient(circle farthest-corner at center,
2522
currentColor 10%,
2523
transparent 0%);
2524
}
2525
}
2526
}
2527
}
2528
}
2529
}
2530
2531
&.color {
2532
min-height: 0;
2533
min-width: 0;
2534
2535
&.horizontal {
2536
padding: 0 0 12px 0;
2537
2538
slider {
2539
&:dir(ltr), &:dir(rtl) { // specificity bump
2540
margin-bottom: $color_slider_margin;
2541
margin-top: $color_marks_slider_margin;
2542
}
2543
}
2544
}
2545
2546
&.vertical {
2547
&:dir(ltr) {
2548
padding: 0 0 0 12px;
2549
2550
slider {
2551
margin-left: $color_slider_margin;
2552
margin-right: $color_marks_slider_margin;
2553
}
2554
}
2555
2556
&:dir(rtl) {
2557
padding: 0 12px 0 0;
2558
2559
slider {
2560
margin-right: $color_slider_margin;
2561
margin-left: $color_marks_slider_margin;
2562
}
2563
}
2564
}
2565
}
2566
}
2567
2568
2569
/*****************
2570
* Progress bars *
2571
*****************/
2572
progressbar {
2573
// sizing
2574
&.horizontal {
2575
trough,
2576
progress { min-height: $bar_size; }
2577
}
2578
2579
&.vertical {
2580
trough,
2581
progress { min-width: $bar_size; }
2582
}
2583
2584
// FIXME: insensitive state missing and some other state should be set probably
2585
color: $secondary_fg_color;
2586
font-size: smaller;
2587
2588
trough { background-color: $divider_color; }
2589
2590
progress { background-color: $primary_color; }
2591
2592
&.osd { // progressbar.osd used for epiphany page loading progress
2593
// min-width: $bar_size;
2594
// min-height: $bar_size;
2595
// background-color: transparent;
2596
2597
// trough { background-color: transparent; }
2598
2599
// progress { background-color: $primary_color; }
2600
}
2601
2602
trough.empty progress { all: unset; } // makes the progress indicator disappear, when the fraction is 0
2603
}
2604
2605
2606
/*************
2607
* Level Bar *
2608
*************/
2609
levelbar {
2610
&.horizontal {
2611
block { min-height: $bar_size; }
2612
2613
&.discrete block {
2614
min-width: $medium_size;
2615
2616
&:not(:last-child) { margin-right: 2px; }
2617
}
2618
}
2619
2620
&.vertical {
2621
block { min-width: $bar_size; }
2622
2623
&.discrete block {
2624
min-height: $medium_size;
2625
2626
&:not(:last-child) { margin-bottom: 2px; }
2627
}
2628
}
2629
2630
// imitate the entry style
2631
trough {
2632
// padding: 2px;
2633
// border-radius: $material_radius;
2634
// box-shadow: $shadow_1;
2635
// background-color: $base_color;
2636
2637
// &:disabled { background-color: $alt_base_color; }
2638
}
2639
2640
block {
2641
&.low { background-color: $warning_color; }
2642
2643
&.high,
2644
&:not(.empty) { background-color: $primary_color; }
2645
2646
&.full { background-color: $success_color; }
2647
2648
&.empty { background-color: $divider_color; }
2649
}
2650
}
2651
2652
2653
/****************
2654
* Print dialog *
2655
*****************/
2656
printdialog {
2657
paper {
2658
padding: 0;
2659
border: 1px solid $border_color;
2660
background-color: $base_color;
2661
color: $fg_color;
2662
}
2663
2664
.dialog-action-box { margin: 12px; }
2665
}
2666
2667
2668
/**********
2669
* Frames *
2670
**********/
2671
frame > border,
2672
.frame {
2673
margin: 0;
2674
padding: 0;
2675
border: 1px solid $border_color;
2676
border-radius: 0;
2677
box-shadow: none;
2678
2679
&.flat { border-style: none; }
2680
}
2681
2682
frame.flat > border { @extend .frame.flat; } // for backward compatibility
2683
2684
actionbar > revealer > box {
2685
padding: $container_padding;
2686
border-top: 1px solid $border_color;
2687
2688
button:not(.suggested-action):not(.destructive-action):not(.server-list-button) { @extend %button_basic.flat; }
2689
}
2690
2691
scrolledwindow {
2692
viewport.frame { // avoid double borders when viewport inside scrolled window
2693
border-style: none;
2694
}
2695
2696
// This is used when content is touch-dragged past boundaries.
2697
// draws a box on top of the content, the size changes programmatically.
2698
@at-root overshoot {
2699
&.top { @include overshoot(top); }
2700
2701
&.bottom { @include overshoot(bottom); }
2702
2703
&.left { @include overshoot(left); }
2704
2705
&.right { @include overshoot(right); }
2706
}
2707
2708
// Overflow indication, works similarly to the overshoot, the size if fixed tho.
2709
@at-root undershoot {
2710
&.top { @include undershoot(top); }
2711
2712
&.bottom { @include undershoot(bottom); }
2713
2714
&.left { @include undershoot(left); }
2715
2716
&.right { @include undershoot(right); }
2717
}
2718
2719
@at-root junction { // the small square between two scrollbars
2720
border-style: solid none none solid;
2721
border-width: 1px;
2722
border-color: $border_color;
2723
background-color: $base_color;
2724
2725
&:dir(rtl) { border-style: solid solid none none; }
2726
}
2727
}
2728
2729
// vbox and hbox separators
2730
separator {
2731
min-width: 1px;
2732
min-height: 1px;
2733
background-color: $border_color;
2734
}
2735
2736
%hide_separators {
2737
min-width: 0;
2738
min-height: 0;
2739
background-color: transparent;
2740
}
2741
2742
2743
/*********
2744
* Lists *
2745
*********/
2746
list {
2747
border-color: $border_color;
2748
background-color: $base_color;
2749
2750
row { padding: 2px; }
2751
}
2752
2753
// FIXME
2754
$row_transition: $shorter_transition, background-color 0, color 0;
2755
2756
row {
2757
&.activatable {
2758
transition: $row_transition,
2759
background-size $ripple_duration $deceleration_curve,
2760
background-image $ripple_opacity_duration $deceleration_curve;
2761
box-shadow: inset 0 0 0 9999px transparent;
2762
background-image: radial-gradient(circle farthest-corner at center,
2763
transparent 10%,
2764
transparent 0%);
2765
background-repeat: no-repeat;
2766
background-position: center;
2767
background-size: 1000% 1000%;
2768
2769
&:hover {
2770
transition: $row_transition,
2771
box-shadow 0,
2772
background-size $ripple_duration $deceleration_curve,
2773
background-image $ripple_opacity_duration $deceleration_curve;
2774
box-shadow: inset 0 0 0 9999px $hover_bg_color;
2775
}
2776
2777
&.has-open-popup, // this is for indicathing which row generated a popover see https://bugzilla.gnome.org/show_bug.cgi?id=754411
2778
&:active {
2779
transition: $row_transition,
2780
background-size 0,
2781
background-image 0;
2782
animation: ripple_effect $longer_duration $deceleration_curve forwards;
2783
box-shadow: inset 0 0 0 9999px $hover_bg_color;
2784
background-image: radial-gradient(circle farthest-corner at center,
2785
$active_bg_color 10%,
2786
transparent 0%);
2787
background-size: 0% 0%;
2788
}
2789
}
2790
2791
&:selected { @extend %selected_items; }
2792
}
2793
2794
2795
/*********************
2796
* App Notifications *
2797
*********************/
2798
.app-notification {
2799
// @extend %osd;
2800
2801
@extend toolbar.osd;
2802
2803
margin: 8px;
2804
2805
button { @extend %button_basic.flat; }
2806
2807
&.frame,
2808
border { border-style: none; }
2809
}
2810
2811
2812
/*************
2813
* Expanders *
2814
*************/
2815
expander {
2816
title > arrow {
2817
transition: all $shorter_duration $deceleration_curve;
2818
min-width: 16px;
2819
min-height: 16px;
2820
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
2821
-gtk-icon-transform: rotate(-90deg);
2822
2823
&:dir(rtl) { -gtk-icon-transform: rotate(90deg); }
2824
2825
&:checked { -gtk-icon-transform: unset; }
2826
2827
color: $secondary_fg_color;
2828
2829
&:hover, &:active { color: $fg_color; }
2830
2831
&:disabled { color: $disabled_secondary_fg_color; }
2832
2833
&:selected {
2834
color: $inverse_secondary_fg_color;
2835
2836
&:hover, &:active { color: $inverse_fg_color; }
2837
2838
&:disabled { color: $inverse_disabled_secondary_fg_color; }
2839
}
2840
}
2841
}
2842
2843
2844
/************
2845
* Calendar *
2846
************/
2847
calendar {
2848
padding: 1px;
2849
border: 1px solid $border_color;
2850
color: $fg_color;
2851
2852
&:disabled { color: $disabled_fg_color; }
2853
2854
&:selected {
2855
@extend %selected_items;
2856
2857
border-radius: $material_radius + 1px;
2858
}
2859
2860
&.header {
2861
border-style: none none solid;
2862
border-radius: 0;
2863
}
2864
2865
&.button { @extend %simple_flat_button; }
2866
2867
&.highlight {
2868
color: $secondary_fg_color;
2869
font-weight: 500;
2870
}
2871
2872
&:indeterminate { color: $disabled_secondary_fg_color; }
2873
}
2874
2875
2876
/***********
2877
* Dialogs *
2878
***********/
2879
messagedialog { // Message Dialog styling
2880
&.background { background-color: $popup_bg_color; }
2881
2882
.titlebar {
2883
min-height: $small_size;
2884
border-style: none;
2885
box-shadow: inset 0 1px $highlight_color;
2886
background-color: $popup_bg_color;
2887
color: $fg_color;
2888
2889
&:backdrop { color: $secondary_fg_color; }
2890
}
2891
2892
&.csd { // rounded bottom border styling for csd version
2893
&.background {
2894
// bigger radius for better antialiasing
2895
border-bottom-left-radius: $material_radius;
2896
border-bottom-right-radius: $material_radius;
2897
}
2898
2899
.dialog-action-area {
2900
margin-top: -$container_padding;
2901
padding: $container_padding;
2902
2903
button {
2904
@extend %simple_flat_button;
2905
border-radius: $material_radius;
2906
2907
&:not(:last-child) { margin-right: $container_padding; }
2908
2909
&.suggested-action:not(:disabled) { color: $suggested_color; }
2910
2911
&.destructive-action:not(:disabled) { color: $destructive_color; }
2912
}
2913
}
2914
}
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($primary_color);
3032
background-clip: content-box;
3033
}
3034
3035
&.sidebar-new-bookmark-row { color: $primary_color; }
3036
3037
&:drop(active):not(:disabled) {
3038
box-shadow: inset 0 0 0 2px $primary_color;
3039
3040
&:selected {
3041
// background-color: $primary_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 $primary_color; }
3257
3258
&.dark overlay { box-shadow: $shadow_1, 0 0 0 2px $primary_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
3311
3312
/********
3313
* Misc *
3314
********/
3315
// content view (grid/list)
3316
.content-view {
3317
background-color: $bg_color;
3318
3319
// &:hover { -gtk-icon-effect: highlight; }
3320
3321
rubberband, .rubberband { @extend rubberband; }
3322
}
3323
3324
.scale-popup {
3325
// .osd & { @extend %osd; }
3326
3327
.osd & button.flat { // FIXME: quick hack, redo properly
3328
}
3329
3330
button { // +/- buttons on GtkVolumeButton popup
3331
}
3332
}
3333
3334
3335
/**********************
3336
* Window Decorations *
3337
**********************/
3338
decoration {
3339
transition: $shadow_transition;
3340
border-radius: $material_radius $material_radius 0 0;
3341
box-shadow: $shadow_4, 0 16px 16px transparent;
3342
3343
// FIXME rationalize shadows
3344
3345
// this is used for the resize cursor area
3346
margin: 8px;
3347
3348
&:backdrop {
3349
// the transparent shadow here is to enforce that the shadow extents don't
3350
// change when we go to backdrop, to prevent jumping windows.
3351
// The biggest shadow should be in the same order then in the active state
3352
// or the jumping will happen during the transition.
3353
box-shadow: $shadow_2, 0 16px 16px transparent;
3354
}
3355
3356
.maximized &,
3357
.fullscreen &,
3358
.tiled &,
3359
.tiled-top &,
3360
.tiled-right &,
3361
.tiled-bottom &,
3362
.tiled-left & { border-radius: 0; }
3363
3364
.popup & { box-shadow: none; }
3365
3366
// server-side decorations as used by mutter
3367
.ssd & { box-shadow: 0 3px 3px rgba(0, 0, 0, 0.16); } // just doing borders, wm draws actual shadows
3368
3369
.csd.popup & {
3370
border-radius: $material_radius;
3371
box-shadow: $shadow_2;
3372
}
3373
3374
tooltip.csd & {
3375
border-radius: $material_radius;
3376
box-shadow: none;
3377
}
3378
3379
messagedialog.csd & {
3380
border-radius: $material_radius;
3381
// box-shadow: $shadow_4, 0 16px 16px transparent;
3382
3383
// &:backdrop { box-shadow: $shadow_2, 0 16px 16px transparent; }
3384
}
3385
3386
.solid-csd & {
3387
margin: 0;
3388
// padding: 4px;
3389
border-radius: 0;
3390
box-shadow: none;
3391
// box-shadow: inset 0 0 0 4px $titlebar_bg_color;
3392
background-color: $titlebar_bg_color;
3393
}
3394
}
3395
3396
// Window Close button
3397
button.titlebutton {
3398
// @extend %simple_flat_button;
3399
3400
@extend %circular_button;
3401
3402
.selection-mode & {
3403
}
3404
}
3405
3406
3407
// catch all extend :)
3408
3409
%selected_items {
3410
background-color: $primary_color;
3411
3412
@at-root %nobg_selected_items, & {
3413
color: $inverse_fg_color;
3414
3415
&:disabled { color: $inverse_disabled_fg_color; }
3416
}
3417
}
3418
3419
.monospace { font-family: monospace; }
3420
3421
3422
/**********************
3423
* Touch Copy & Paste *
3424
**********************/
3425
// touch selection handlebars for the Popover.osd above
3426
cursor-handle {
3427
border-radius: $circular_radius;
3428
background-color: $primary_color;
3429
background-image: none;
3430
3431
&.top:dir(ltr), &.bottom:dir(rtl) {
3432
padding-left: 6px;
3433
border-top-right-radius: 0;
3434
}
3435
3436
&.bottom:dir(ltr), &.top:dir(rtl) {
3437
padding-right: 6px;
3438
border-top-left-radius: 0;
3439
}
3440
3441
&.insertion-cursor:dir(ltr), &.insertion-cursor:dir(rtl) {
3442
-GtkWidget-text-handle-width: 24;
3443
-GtkWidget-text-handle-height: 30;
3444
3445
$_url: 'assets/scale-horz-marks-before-slider#{$asset_suffix}';
3446
-gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
3447
url('#{$_url}@2.png'));
3448
}
3449
}
3450
3451
.context-menu { font: initial; } // Decouple the font of context menus from their entry/textview
3452
3453
// shortcut window keys
3454
.keycap {
3455
min-width: 28px - 8px * 2;
3456
min-height: 28px - 2px;
3457
margin-top: 2px;
3458
padding-bottom: 2px;
3459
padding-left: 8px;
3460
padding-right: 8px;
3461
3462
border: solid 1px $border_color;
3463
border-radius: $material_radius + 1px;
3464
box-shadow: inset 0 -2px $border_color;
3465
background-color: $popup_bg_color;
3466
color: $fg_color;
3467
font-size: smaller;
3468
}
3469
3470
:not(decoration):not(window):drop(active) { // FIXME needs to be done widget by widget, this wildcard should really die
3471
transition: $shorter_transition;
3472
box-shadow: $shadow_1, inset 0 0 0 2px $primary_color;
3473
caret-color: $primary_color;
3474
}
3475
3476
stackswitcher button.text-button { min-width: 100px; } // FIXME aggregate with buttons
3477
3478
stackswitcher button.circular,
3479
stackswitcher button.text-button.circular { // FIXME aggregate with buttons
3480
min-width: $medium_size;
3481
min-height: $medium_size;
3482
padding: 0;
3483
}
3484
3485
3486
/*********
3487
* Emoji *
3488
*********/
3489
popover.emoji-picker {
3490
padding: 0;
3491
3492
entry {
3493
border-bottom: 1px solid $border_color;
3494
border-radius: 0;
3495
box-shadow: none;
3496
background-color: transparent;
3497
}
3498
3499
scrolledwindow { border-bottom: 1px solid $border_color; }
3500
}
3501
3502
// mimic tab style
3503
button.emoji-section {
3504
margin-top: -1px;
3505
padding: 0 8px;
3506
min-width: 24px;
3507
min-height: $medium_size;
3508
border-radius: 0;
3509
outline-offset: -6px;
3510
3511
&, &:hover, &:active { box-shadow: inset 0 2px transparent; }
3512
3513
&:checked {
3514
box-shadow: inset 0 2px $primary_color;
3515
background-color: transparent;
3516
}
3517
3518
&:hover, &:active { background-color: $hover_bg_color; }
3519
3520
&:first-child { margin-left: 4px; }
3521
3522
&:last-child { margin-right: 4px; }
3523
}
3524
3525
.emoji {
3526
min-width: 3em;
3527
min-height: 3em;
3528
padding: 0 8px;
3529
// font-size: larger;
3530
3531
widget {
3532
transition: $shorter_transition;
3533
border-radius: $material_radius;
3534
3535
&:hover { background-color: $hover_bg_color; }
3536
}
3537
}
3538