Debian Codegraph @

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