Debian Codegraph @

src/gtk4/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 }
91 }
92
93 menu menuitem & {
94 margin: 0; // this is a workaround for a menu check/radio size allocation issue
95 min-height: 14px;
96 min-width: 14px;
97 background-color: transparent;
98 box-shadow: none;
99 -gtk-icon-shadow: none;
100 animation: none;
101 }
102 }
103
104 check{
105 border-radius: $r;
106 &:checked {
107 -gtk-icon-source: -gtk-recolor(url("../assets/checkmark-symbolic.svg"));
108 }
109 &:indeterminate {
110 -gtk-icon-source: -gtk-recolor(url("../assets/dash-symbolic.svg"));
111 }
112 }
113 radio {
114 border-radius: 50%;
115 &:checked {
116 -gtk-icon-source: -gtk-recolor(url("../assets/bullet-symbolic.svg"));
117 }
118 &:indeterminate {
119 -gtk-icon-source: -gtk-recolor(url("../assets/dash-symbolic.svg"));
120 }
121 }
122
123 radio:not(:indeterminate):not(:checked):active:not(:backdrop) { -gtk-icon-transform: scale(0); }
124
125 check:not(:indeterminate):not(:checked):active:not(:backdrop) { -gtk-icon-transform: translate(-4px, 3px) scale(0) }
126
127 radio,
128 check {
129 &:active { -gtk-icon-transform: scale(0, 1); }
130
131 &:checked:not(:backdrop), &:indeterminate:not(:backdrop) {
132 -gtk-icon-transform: unset;
133 }
134 }