only actually set style properties if they are marked as dirty