set style if v isn't undefined