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