In a court ruling Monday, the mask mandate at the Phoenix Union High School District is not illegal, but will be once a new law goes into effect.