Generalization of the selectors applyBackground and applyShadow.