better transitions and overflow handling in css