| 1 |
@charset "UTF-8"; |
| 2 |
|
| 3 |
/********** |
| 4 |
* Switch * |
| 5 |
**********/ |
| 6 |
|
| 7 |
$switch-height: 24px; |
| 8 |
|
| 9 |
switch { |
| 10 |
margin: 2px; |
| 11 |
font-weight: bold; |
| 12 |
font-size: smaller; |
| 13 |
border: 1px solid; |
| 14 |
border-radius: 12px; |
| 15 |
color: transparent; |
| 16 |
background-color: gtkalpha( |
| 17 |
gtk("@theme_button_foreground_normal"), |
| 18 |
0.05 |
| 19 |
); |
| 20 |
border-color: gtkalpha( |
| 21 |
gtk("@theme_button_foreground_normal"), |
| 22 |
0.222 |
| 23 |
); |
| 24 |
text-shadow: none; |
| 25 |
|
| 26 |
&:disabled { |
| 27 |
background-color: gtkalpha( |
| 28 |
gtk("@theme_button_foreground_normal"), |
| 29 |
0.03 |
| 30 |
); |
| 31 |
} |
| 32 |
|
| 33 |
&:checked { |
| 34 |
background: gtkalpha( |
| 35 |
gtk("@theme_button_decoration_hover"), |
| 36 |
0.333 |
| 37 |
); |
| 38 |
border-color: gtk("@theme_button_decoration_hover"); |
| 39 |
|
| 40 |
&:disabled { |
| 41 |
background: gtkalpha( |
| 42 |
gtk("@theme_button_decoration_hover"), |
| 43 |
0.222 |
| 44 |
); |
| 45 |
border-color: gtkalpha( |
| 46 |
gtk("@theme_button_decoration_hover"), |
| 47 |
0.777 |
| 48 |
); |
| 49 |
} |
| 50 |
} |
| 51 |
|
| 52 |
&:dir(ltr) { |
| 53 |
&:checked slider { |
| 54 |
margin-left: 1px; |
| 55 |
} |
| 56 |
&:not(:checked) slider { |
| 57 |
margin-right: 1px; |
| 58 |
} |
| 59 |
} |
| 60 |
|
| 61 |
slider { |
| 62 |
min-width: $switch-height; |
| 63 |
min-height: $switch-height; |
| 64 |
margin: -($switch-height / 6); |
| 65 |
border: 1px solid; |
| 66 |
border-radius: $switch-height / 2; |
| 67 |
|
| 68 |
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.125); |
| 69 |
border-color: gtk("@borders"); |
| 70 |
background: gtk("@theme_button_background_normal"); |
| 71 |
} |
| 72 |
|
| 73 |
&:hover slider { |
| 74 |
border-color: gtk("@theme_button_decoration_hover"); |
| 75 |
} |
| 76 |
|
| 77 |
&:focus slider { |
| 78 |
border-color: gtk("@theme_button_decoration_focus"); |
| 79 |
} |
| 80 |
|
| 81 |
&:disabled slider { |
| 82 |
box-shadow: none; |
| 83 |
color: gtk("@theme_button_foreground_insensitive"); |
| 84 |
border-color: gtk("@insensitive_borders"); |
| 85 |
background: gtk("@theme_button_background_insensitive"); |
| 86 |
|
| 87 |
&:active, |
| 88 |
&:checked { |
| 89 |
color: gtk( |
| 90 |
"@theme_button_foreground_active_insensitive" |
| 91 |
); |
| 92 |
} |
| 93 |
} |
| 94 |
} |