Earlier quoted context omitted.
I agree that theming was much more consistent a decade ago in linux-land. GTK2 + QT with GTK2-style would get you an almost seamless experience. The "dark or light" theme we have today is an absolute joke by comparison. Many Gtk-engines were also much faster in terms of pure rendering speed. Another issue as mentioned is that per-control CSS skinning breaks easily with custom themes. Instead of using system colors de…
> Another issue as mentioned is that per-control CSS skinning breaks easily with custom themes. Instead of using system colors devs often hard-code a custom look. After years of using MacOS, I made a commitment this year to use, support, and develop for Linux on a regular basis. Starting off with little knowledge of GTK, I progressed from "hello world" to working on my first app, but end user customization has always…
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.htmlI 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.