unify style apply function