Add `@media (prefers-color-scheme: dark)` (or similar) support in stylesheets
libadwaita applications will load ~/.config/gtk-4.0/gtk.css
, and this is how e.g. Gradience is able to define custom color schemes. However, as it stands right now, any style defined in this file will affect both light and dark color schemes. It would be useful to support the @media (prefers-color-scheme: dark)
query (or something functionally equivalent) so that style defines for both light and dark mode can be set within the same CSS file.
Alternatively, loading ~/.config/gtk-4.0/gtk-dark.css
when dark mode is enabled would do the job.
Currently, the only workaround to this issue is to use a Bash script and shell extension.
(Note to future self: https://gitlab.gnome.org/GNOME/libadwaita/-/blob/main/src/adw-style-manager.c#L164)
Edited by QwertyChouskie