GtkGrid handles structural CSS pseudo-classes based on added order, not visual order
GtkGrid under GTK+ 3.22 seems to handle structural CSS pseudo classes based on the order children are added/inserted, not their position in the container, which leads to surprising results.
I am using CSS :first-child and :last-child pseudo classes to style the first and last widget in a single-row GtkGrid. Usually two widgets get added, but some time later if needed, a third child might be inserted in front of both. In both cases, any style applied using e.g. :first-child is applied to the first child added, even though in the latter case the third child is positioned before the first one.