Collapse of polymeric networks in a mixed solvent