style: extract applyShadowTo and applyBackgroundTo