News for hackers. Stuff that matters.
Re:Remembering Windows 3.1 themes and user empowerment by cycloptic on Friday January 22, 2021 @03:31PM (#25875998)
For whatever reason this is not well documented, but all the theme's colors are available with a special syntax in the CSS: https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gtk/theme/A...

So for example you should be using this to use the user's foreground and background color:

    color: @theme_fg_color;
    background-color: @theme_bg_color;
You can use some modifier functions on those colors too to compute additional colors: https://developer.gnome.org/gtk4/stable/ch39s02.html

I would suggest against trying to piggy back on built-in CSS styles; usually with the default widgets you want to favor composition over inheritance. But if you really need to you can use the GTK inspector to look at the styles on any given system widget, that should be a bit easier than grepping through the CSS.

Re:Remembering Windows 3.1 themes and user empowerment by kiawe_fire on Friday January 22, 2021 @04:24PM (#25876532)
Thanks for the pointers, this is very helpful!