optimize resize sync logic;minor updates in style