Implements applyStyles.