aboutsummaryrefslogtreecommitdiff
path: root/.themes/FlatColor/gtk-3.20/widgets/switch.css
blob: 5bf986ae1cc1c87a2d00af825afab54fdb307ed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**********
 * Switch *
 **********/

switch {
    transition: all 0.3s cubic-bezier(0, 0, 0.2, 1), color 0;
    margin: 6px 0;
    border: 4px solid transparent;
    border-radius: 100px;
    background-color: alpha(#000, 0.2);
    background-clip: padding-box;
    font-size: 0;
}
switch:disabled {
    color: shade(@selected_bg_color, 0.8);
    background-color: alpha(#000, 0.1);
}

switch image {
    color: alpha(#000, 0.0);
}

switch:disabled image:disabled {
    color: alpha(#000, 0.0);
}

switch:checked {
    background-color: shade(@selected_bg_color, 0.7);
}
switch:checked:disabled {
    background-color: rgba(68, 138, 255, 0.2);
    color: rgba(0, 0, 0, 0.32);
}
switch slider {
    transition: all 0.3s cubic-bezier(0, 0, 0.2, 1), color 0;
    border-image: none;
    background-color: @selected_bg_color;
    color: rgba(0, 0, 0, 0.8);
    transition: all 0.3s cubic-bezier(0, 0, 0.2, 1), color 0, margin 0;
    min-width: 24px;
    min-height: 24px;
    margin: -4px 0 -4px -4px;
    -gtk-outline-radius: 100px;
    border-radius: 400px;
    background-image: -gtk-gradient(radial, center center, 0, center center, 0.5, to(transparent), to(transparent));
}

switch:hover slider {
    border-image: none;
}
switch:disabled slider {
    background-color: shade(@selected_bg_color, 0.7);
    color: rgba(0, 0, 0, 0.32);
}
switch:checked slider {
    transition: all 0.3s cubic-bezier(0, 0, 0.2, 1), color 0, margin 0, background-image 0;
    animation: needs_attention 0.3s cubic-bezier(0, 0, 0.2, 1) forwards;
    margin: -4px -4px -4px 0;
    color: @selected_fg_color;
}
switch:checked:disabled slider {
    animation: none;
}