Debian Codegraph @

src/gtk4/widgets/_base.scss

raw
1 @charset "UTF-8";
2
3 $ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
4
5 * {
6 padding: 0;
7
8 outline-width: 0px;
9 }
10
11 /***************
12 * Base States *
13 ***************/
14
15 .background {
16 color: gtk("@theme_fg_color");
17 background-color: gtk("@theme_bg_color");
18
19 &:backdrop {
20 text-shadow: none;
21 -gtk-icon-shadow: none;
22 color: gtk("@theme_unfocused_fg_color");
23 background-color: gtk("@theme_unfocused_bg_color");
24 }
25 }
26
27 /*
28 These wildcard seems unavoidable, need to investigate.
29 Wildcards are bad and troublesome, use them with care,
30 or better, just don't.
31 Everytime a wildcard is used a kitten dies, painfully.
32 */
33
34 .gtkstyle-fallback {
35 background-color: gtk("@theme_bg_color");
36 color: gtk("@theme_fg_color");
37 &:hover {
38 background-color: gtkshade("@theme_bg_color", 1.1);
39 color: gtk("@theme_fg_color");
40 }
41 &:active {
42 background-color: gtkshade("@theme_bg_color", 0.9);
43 color: gtk("@theme_fg_color");
44 }
45 &:disabled {
46 background-color: gtk("@insensitive_fg_color");
47 color: gtk("@insensitive_fg_color");
48 }
49 &:selected {
50 background-color: gtk("@theme_selected_bg_color");
51 color: gtk("@theme_selected_fg_color");
52 }
53 }
54
55 %view,
56 .view {
57 color: gtk("@theme_text_color");
58 background-color: gtk("@theme_base_color");
59
60 &:backdrop {
61 color: gtk("@theme_unfocused_text_color");
62 background-color: gtk("@theme_unfocused_base_color");
63 }
64
65 &:disabled {
66 color: gtk("@insensitive_base_fg_color");
67 }
68
69 &:selected {
70 &:focus,
71 & {
72 border-radius: $r;
73 @extend %selected_items;
74 }
75 }
76 }
77
78 .view,
79 textview {
80 text {
81 @extend %view;
82
83 selection {
84 &:focus,
85 & {
86 @extend %selected_items;
87 }
88 }
89 }
90 }
91
92 textview border {
93 background-color: gtk("@theme_base_color");
94 background-image: image(
95 gtk("@borders")
96 ); // HACK: the border node just draws background so,
97 background-repeat: no-repeat; // using a background-image to draw the border
98
99 &:backdrop {
100 background-color: gtk("@theme_unfocused_base_color");
101 }
102
103 &.bottom {
104 background-size: 100% 1px;
105 background-position: top;
106 }
107
108 &.top {
109 background-size: 100% 1px;
110 background-position: bottom;
111 }
112
113 &.left {
114 background-size: 1px 100%;
115 background-position: right;
116 }
117
118 &.right {
119 background-size: 1px 100%;
120 background-position: left;
121 }
122 }
123
124 .rubberband,
125 rubberband {
126 border: 1px solid gtk("@theme_selected_bg_color");
127 background-color: gtkalpha(
128 gtk("@theme_selected_bg_color"),
129 0.8
130 );
131 &:backdrop {
132 border-color: gtk("@theme_unfocused_selected_bg_color");
133 background-color: gtkalpha(
134 gtk("@theme_unfocused_selected_bg_color"),
135 0.8
136 );
137 }
138 }
139
140 flowbox {
141 rubberband {
142 @extend rubberband;
143 }
144
145 flowboxchild {
146 padding: 3px;
147 border-radius: $r;
148
149 &:selected {
150 @extend %selected_items;
151
152 outline-offset: 0px;
153 }
154 }
155 }
156
157 label {
158 &.separator {
159 color: gtk("@theme_fg_color");
160 @extend .dim-label;
161 &:backdrop {
162 color: gtk("@theme_unfocused_fg_color");
163 }
164 }
165
166 selection {
167 background-color: gtk("@theme_selected_bg_color");
168 color: gtk("@theme_selected_fg_color");
169 }
170 &:disabled {
171 color: gtk("@insensitive_fg_color");
172 selection {
173 @extend %selected_items, :disabled;
174 }
175
176 &:backdrop {
177 color: gtk("@insensitive_unfocused_fg_color");
178 }
179 }
180 &:backdrop {
181 color: gtk("@theme_unfocused_text_color");
182
183 selection {
184 @extend %selected_items, :backdrop;
185 }
186 }
187 }
188
189 .dim-label {
190 opacity: 0.5;
191 text-shadow: none;
192 }
193
194 %osd,
195 .osd {
196 color: gtk("@theme_fg_color");
197 border: 1px solid gtk("@borders");
198 background-color: gtkalpha(gtk("@theme_bg_color"), 0.8);
199 background-clip: padding-box;
200 box-shadow: none;
201 text-shadow: none;
202 -gtk-icon-shadow: none;
203 &:backdrop {
204 color: gtk("@theme_unfocused_text_color");
205 background-color: gtkalpha(
206 gtk("@theme_unfocused_bg_color"),
207 0.8
208 );
209 -gtk-icon-shadow: none;
210 }
211 }
212
213 %selected_items {
214 background-color: gtk("@theme_selected_bg_color");
215 color: gtk("@theme_selected_fg_color");
216 &:hover {
217 background-color: gtk(
218 "@theme_hovering_selected_bg_color"
219 );
220 color: gtk("@theme_fg_color");
221 }
222 &:backdrop {
223 background-color: gtk(
224 "@theme_unfocused_selected_bg_color"
225 );
226 color: gtk("@theme_unfocused_base_color");
227 }
228 }
229
230 %selected_items {
231 background-color: gtk("@theme_selected_bg_color");
232 border-radius: 0px;
233
234 @at-root %nobg_selected_items,
235 & {
236 color: gtk("@theme_selected_fg_color");
237
238 &:disabled {
239 color: gtk("@insensitive_selected_fg_color");
240 }
241
242 &:backdrop {
243 color: gtk("@theme_unfocused_selected_fg_color");
244
245 &:disabled {
246 color: gtk(
247 "@insensitive_unfocused_selected_fg_color"
248 );
249 }
250 }
251 }
252 }
253
254 picture:disabled {
255 opacity: 0.5;
256 }