update the style of the preview