Debian Codegraph @

gtk/theme/Default/README

raw
1 Summary
2 -------
3
4 * To be able to use the latest/adequate version of sass, install sassc
5 * meson will regenerate the CSS every time you modify the SCSS files.
6 * Note that meson always builds out-of-tree, so the modified css files will
7 appear in your builddir.
8
9 Theme variants
10 --------------
11
12 The Default theme comes in 4 variants: light, dark, hc (highcontrast) and
13 hc-dark (highcontrast inverse). The generated CSS files for the variants
14 are called Default-$variant.css. For technical reasons, GTK adds one level
15 of include wrappers around these, which are called gtk-$variant.css.
16
17 How to tweak the theme
18 ----------------------
19
20 Default is a complex theme, so to keep it maintainable it's written and
21 processed in SASS. The generated CSS is then transformed into a gresource file
22 during gtk build and used at runtime in a non-legible or editable form.
23
24 It is very likely your change will happen in the _common.scss file. That's where
25 all the widget selectors are defined. Here's a rundown of the "supporting"
26 stylesheets, that are unlikely to be the right place for a drive by stylesheet
27 fix:
28
29 _colors.scss - global color definitions. We keep the number of defined
30 colors to a necessary minimum, most colors are derived
31 from a handful of basics. It covers both the light variant
32 and the dark variant.
33
34 _colors-public.scss - SCSS colors exported through gtk to allow for 3rd party
35 apps color mixing.
36
37 _drawing.scss - drawing helper mixings/functions to allow easier
38 definition of widget drawing under specific context. This
39 is why Default isn't 15000 LOC.
40
41 _common.scss - actual definitions of style for each widget. This is
42 where you are likely to add/remove your changes.
43
44 You can read about SASS at http://sass-lang.com/documentation/. Once you make
45 your changes to the _common.scss file, GTK will rebuild the CSS files.