Reduce UI flicker when performing CSS updates