moved the style related code to style updater
instead of custom event, simulate 'change' event