Open Bug 2003691 Opened 11 months ago Updated 1 month ago

Our overrides for adwaita-family themes also override user-defined colors in gtk.css

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 145
defect

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:

  1. Get GTK theme adw-gtk3
  2. Set @define-color headerbar_bg_color yellow; in ~/.config/gtk-3.0/gtk.css
  3. 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.

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.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Blocks: gtk-theme
Priority: -- → P3

@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.

Flags: needinfo?(emilio)

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...

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(emilio)
See Also: → 1982248
Summary: Defined colors in gtk.css ignored → Our overrides for adwaita-family themes also override user-defined colors in gtk.css

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.

Severity: -- → S3
Whiteboard: gtk-severity-sweep-2026-10
You need to log in before you can comment on or make changes to this bug.