A fork of the Materia GTK theme.

Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

 _common.scss

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