auto class generation and css modification