roundabout,
created on Sunday, 21 March 2021, 14:24:27 (1616336667),
received on Sunday, 11 May 2025, 13:23:00 (1746969780)
Author identity: nana-4 <hnmaigo@gmail.com>
95beee2ecafea38528edb723fc8b0c2f0f9b2154
HACKING.md
@@ -1,19 +1,19 @@
## Summary
- Do not edit the CSS directly, edit the source SCSS files and the CSS files
will be generated automatically when building with `meson` + `ninja`.
- You'll need to have `sassc` installed.
- Do not edit `foo.<theme-name>.scss` auto-generated by `meson`.
- To be able to use the latest/adequate version of Sass, install `sassc`.
- `meson install` will regenerate the CSS every time you modify the SCSS files.
- Note that Meson always builds out-of-tree, so the regenerated CSS files will
appear in your builddir.
- Do not edit the PNG directly, edit the source SVG files and run `./render-assets.sh`.
- You'll need to have `inkscape` and `optipng` installed.
- To be able to run `./render-assets.sh`, install `inkscape` and `optipng`.
- To change the colors of SVG files, use a text editor instead of a image editor.
## How to tweak the theme
### SCSS
Like the upstream Adwaita, to keep it maintainable it's written and processed in
Sass.
Materia is a complex theme, so to keep it maintainable it's written and
processed in Sass, like the upstream Adwaita.
Here's a rundown of the "supporting" stylesheets, that are unlikely to be the
right place for a drive by stylesheet fix:
@@ -24,13 +24,13 @@ File | Description
`_color-palette.scss` | Material Design color palette definitions. We don't recommend editing this unless Google updates the color scheme.
`_colors.scss` | Global color definitions. We keep the number of defined colors to a necessary minimum. It covers both the light variant and the dark variant.
`_colors-public.scss` | SCSS colors exported through GTK to allow for 3rd party apps color mixing.
`_drawing*.scss` | Drawing helper mixings/functions to allow easier definition of widget drawing under specific context.
`_common*.scss` | Actual definitions of style for each widget. This is where you are likely to add/remove your changes.
`_apps*.scss` <br> `_extensions.scss` | App/extension specific stylings.
`_drawing.scss` | Drawing helper mixings/functions to allow easier definition of widget drawing under specific context.
`_common.scss` | Actual definitions of style for each widget. This is where you are likely to add/remove your changes.
`_apps.scss` <br> `_extensions.scss` | App/extension specific stylings.
You can read about Sass on its [web page](http://sass-lang.com/documentation/).
Once you make your changes to the SCSS files, you can run `ninja` to generate the
final CSS files.
Once you make your changes to the SCSS files, you can run `meson install`
to generate the final CSS files.
### SVG
@@ -82,12 +82,11 @@ colors are defined.
- `src/gtk-3.0/assets.svg`
- `src/gtk-2.0/assets{,-dark}.svg`
- `src/cinnamon/assets/*.svg`
- `src/gnome-shell/assets{,-dark}/*.svg`
- `src/unity/*.svg`
- `src/unity/assets{,-light}/*.svg`
- `src/xfwm4/assets{,-light}/*.svg`
- `src/unity/*/*.svg`
- `src/xfwm4/xfwm4{,-dark,-light}/*.svg`
- `src/chrome/chrome-scrollbar{,-dark}/icons/*.svg`
- `src/chrome/chrome-theme{,-dark,-light}/*.svg`
> Note: Do not forget to run `./render-assets.sh` after changing the colors of
`src/gtk-3.0/assets.svg` and `src/gtk-2.0/assets{,-dark}.svg`.
@@ -96,20 +95,20 @@ colors are defined.
- `src/gtk-2.0/gtkrc{,-dark,-light}`
- `src/metacity-1/metacity-theme-2{,-light}.xml`
- `src/xfwm4/assets{,-light}/themerc`
- `src/xfwm4/xfwm4{,-dark,-light}/themerc`
- `src/chrome/chrome-theme{,-dark,-light}/manifest.json`
> Note: The colors of `manifest.json` are defined in RGB format, so you need to
convert your colors from HEX format to RGB format.
After all the steps, run `ninja` to rebuild the themes.
After all the steps, run `meson install` to rebuild the themes.
## Useful Links
### Upstream theme sources
- [GTK 4.0](https://gitlab.gnome.org/GNOME/gtk/tree/master/gtk/theme/Adwaita) (master)
- [GTK 3](https://gitlab.gnome.org/GNOME/gtk/tree/gtk-3-24/gtk/theme/Adwaita) (3.24)
- [GTK 4](https://gitlab.gnome.org/GNOME/gtk/tree/master/gtk/theme/Adwaita)
- [GTK 3](https://gitlab.gnome.org/GNOME/gtk/tree/gtk-3-24/gtk/theme/Adwaita)
- [GTK 2](https://gitlab.gnome.org/GNOME/gnome-themes-extra/tree/master/themes/Adwaita/gtk-2.0)
- [GNOME Shell](https://gitlab.gnome.org/GNOME/gnome-shell/tree/master/data/theme)
- [Sass sources](https://gitlab.gnome.org/GNOME/gnome-shell-sass) (legacy)