Our overrides for adwaita-family themes also override user-defined colors in gtk.css
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
People
(Reporter: noltogreen2187, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: gtk-severity-sweep-2026-10)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:145.0) Gecko/20100101 Firefox/145.0
Steps to reproduce:
- Get GTK theme adw-gtk3
- Set
@define-color headerbar_bg_color yellow;in ~/.config/gtk-3.0/gtk.css - Open Firefox
Actual results:
Headerbar isn't yellow like defined in gtk.css
Expected results:
Headerbar would be yellow like defined in gtk.css
Additional Notes: The expected result can be achieved on Firefox ESR, and older versions.
| Reporter | ||
Comment 1•11 months ago
|
||
It actually appears to ignore all @define-color vars completely regardless if its in the GTK theme or in ~/.config/gtk-3.0/gtk.css.
| Comment hidden (duplicate) |
Comment 3•10 months ago
|
||
@define-color only defines constants and is also deprecated in gtk4 at least. With that said if it works in ESR but not in Nightly this may be something that is intentional.
Comment 4•10 months ago
|
||
Well we do look at some named colors like here. This worked in the past with adw-* because before bug 1982248 we didn't consider it an adwaita theme and thus we didn't override its headerbar / sidebar / etc colors and so on.
I don't think there's a reliable way of detecting whether the native color comes from the builtin theme or gtk.css tho...
Comment 5•10 months ago
|
||
I see, never knew this way of globally overriding colors even existed in gtk3. Tried it now with Shotwell (gtk3) and it does work. But as Emilio said it's probably not possible for Fx to know this. Not without parsing the css theme directly at least.
Updated•1 month ago
|
Description
•