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