Refactor css for preview