Both foreground and background colors should be defined implicitly together or not defined at all.
Really you shouldn't trying to reproduce this, but if you want, this is firefox with
browser.display.use_system_colors = true
and env GTK_THEME=Adwaita:dark