Auto rewrite and optimize css