Theme feature request: support the :nth-child CSS pseudo class
It would be nice to support the :nth-child
CSS pseudo class, like :first-child
and :last-child
are currently supported. Our use-case is: we have different background gradients for buttons in a customized notification, as can be seen here:
We have a workaround in place:
// @todo: This is a workaround for the missing CSS selector, :nth-child
button.add_style_class_name('child-' + this._buttonBox.get_n_children());
But it's not robust enough, because the added classes get inconsistent when buttons are removed.
Edited by Manuel Quiñones