Exploring the functionality of theming in GTK3 using CSS, I decided to experiment with my default theme in Ubuntu 13.04, known as Ambiance. The source for this theme can be found at
/usr/share/themes/Ambiance/gtk-3.0/
.
Interestingly, when attempting to modify a color within the gtk-main.css
file in this directory (within a @define-color statement), I discovered that the change did not take effect even after restarting the computer.
Upon further investigation, I came across a settings.ini
file (located in the same folder) with the following contents:
[Settings]
gtk-color-scheme = "base_color:#ffffff\nbg_color:#f2f1f0\ntooltip_bg_color:#000000\nselected_bg_color:#ffffff\ntext_color:#3C3C3C\nfg_color:#4c4c4c\ntooltip_fg_color:#ffffff\nselected_fg_color:#ffffff\nlink_color:#DD4814\nbg_color_dark:#3c3b37\nfg_color_dark:#dfdbd2"
gtk-auto-mnemonics = 1
Surprisingly, it appears that the content of gtk-main.css
is actually embedded within the settings.ini
file under the variable gtk-color-scheme. Modifying this variable indeed results in a change to the color scheme in my current Gtk theme.
This raises some questions:
- Why the redundancy? (Perhaps removing the gtk-main.css file would have prevented confusion.)
- Is this specific to Ubuntu or a universal practice? If so, where is it documented? I couldn't find any information about this on the Gnome website.
- What is the purpose behind this setup?