unable to set GtkEntry background colour properly
gtk+ 3.18.9, it is not possible to set the background colour for a GtkEntry using CSS background-color property. The theme always overwrites the specified colour, even with the highest gtkstyleprovider priority. Note that the background colour setting IS honoured when the widget is insensitive, but not when the widget is sensitive.
The only workaround I have found is to catch state changes for the widget and force it to use the "insensitive" state via gtk_style_context_set_state(ctx, GTK_WIDGET_STATE_INSENSITIVE); which produces the desired results.
Note that this also affects comboboxes and spinbuttons as they also contain GtkEntries.