Debian Codegraph @

src/gtk3/widgets/_checkboxes.scss

raw
1 @charset "UTF-8";
2
3 /*************************
4 * Check and Radio items *
5 *************************/
6
7 checkbutton.text-button,
8 radiobutton.text-button {
9 // this is for a nice focus on check and radios text
10 padding: 2px 0;
11 outline-offset: 0;
12
13 label:not(:only-child) {
14 &:first-child {
15 margin-left: 4px;
16 }
17 &:last-child {
18 margin-right: 4px;
19 }
20 }
21 }
22
23 check,
24 radio {
25 transition: 0.1s;
26 margin: 0 4px;
27
28 &:only-child {
29 margin: 0;
30 }
31
32 min-height: 14px;
33 min-width: 14px;
34 //border: none;
35 animation-timing-function: $ease-out-quad;
36 background-color: gtk("@theme_button_background_normal");
37 border: 1px solid gtkalpha(
38 gtk("@theme_button_foreground_normal"),
39 0.33
40 );
41
42 -gtk-icon-shadow: none;
43 -gtk-icon-palette: fg gtk("@theme_fg_color");
44
45 &:hover {
46 border: 1px solid gtk("@theme_button_decoration_hover");
47 }
48 &:disabled {
49 background-color: gtk("@insensitive_base_color");
50
51 border-color: gtkalpha(
52 gtk("@insensitive_base_fg_color"),
53 0.33
54 );
55 }
56
57 &:active {
58 background: shade(gtk("@theme_base_color"), 0.9)
59 }
60
61 &:focus {
62 border-color: gtk("@theme_button_decoration_focus");
63 }
64
65 &:indeterminate,
66 &:checked {
67 border-color: gtk("@theme_button_decoration_hover");
68 background-color: gtkalpha(
69 gtk("@theme_button_decoration_hover"),
70 0.33
71 );
72
73 &:backdrop {
74 background-color: gtkalpha(
75 gtk("@theme_unfocused_selected_bg_color"),
76 0.33
77 );
78
79 border-color: gtk("@theme_unfocused_selected_bg_color");
80 }
81
82 &:disabled {
83 background-color: gtkalpha(
84 gtk("@insensitive_bg_color"),
85 0.33
86 );
87
88 border-color: gtk("@insensitive_bg_color");
89 color: gtk("@insensitive_fg_color");
90 -gtk-icon-effect: none;
91 }
92 }
93
94 menu menuitem & {
95 margin: 0; // this is a workaround for a menu check/radio size allocation issue
96 min-height: 14px;
97 min-width: 14px;
98 background-color: transparent;
99 box-shadow: none;
100 -gtk-icon-shadow: none;
101 animation: none;
102 }
103 }
104
105 check{
106 border-radius: $r;
107 &:checked {
108 -gtk-icon-source: -gtk-recolor(url("../assets/checkmark-symbolic.svg"));
109 }
110 &:indeterminate {
111 -gtk-icon-source: -gtk-recolor(url("../assets/dash-symbolic.svg"));
112 }
113 }
114 radio {
115 border-radius: 50%;
116 &:checked {
117 -gtk-icon-source: -gtk-recolor(url("../assets/bullet-symbolic.svg"));
118 }
119 &:indeterminate {
120 -gtk-icon-source: -gtk-recolor(url("../assets/dash-symbolic.svg"));
121 }
122 }
123
124 radio:not(:indeterminate):not(:checked):active:not(:backdrop) { -gtk-icon-transform: scale(0); }
125
126 check:not(:indeterminate):not(:checked):active:not(:backdrop) { -gtk-icon-transform: translate(-4px, 3px) scale(0) }
127
128 radio,
129 check {
130 &:active { -gtk-icon-transform: scale(0, 1); }
131
132 &:checked:not(:backdrop), &:indeterminate:not(:backdrop) {
133 -gtk-icon-transform: unset;
134 }
135 }