improved merge css and snapping