Girls at a North Carolina charter school that teaches kindergarten through eighth grade will no longer be required to wear skirts as part of their uniform, a federal judge ruled last Thursday.

The fight against Charter Day School’s uniform policy began in 2016, after Keely Burks, an eighth-grade student at the time, started a petition asking the school to amend its rules regarding girls’ uniforms. Unlike boys at the school, Burks said, girls weren’t allowed to sit cross-legged in class or even do cartwheels during recess because their skirts limited their mobility. Her petition garnered more than 100 signatures, Burks wrote in a post published on the ACLU’s website, but it was “taken from us by a teacher and we never got it back.” The ACLU of North Carolina then filed a lawsuit against the school on behalf of Burks and two other students, arguing that the school’s uniform policy illegally discriminates against girls.

Charter Day, for its part, claimed the uniform policy was part of an approach that emphasized “traditional values” in the classroom, the New York Times reports. “The uniform policy seeks to establish an environment in which our young men and women treat one another with respect,” Baker Mitchell, the founder of the Roger Bacon Academy, which oversees Charter Day and other schools in the area, wrote in an email to a parent in 2015. The question is what “respect” has to do with prohibiting girls from wearing pants — and limiting their mobility as a result.

The judge ultimately sided with the students. “The plaintiffs in this case,” Judge Malcolm Howard wrote in his decision, “have shown that the girls are subject to a specific clothing requirement that renders them unable to play as freely during recess, requires them to sit in an uncomfortable manner in the classroom, causes them to be overly focused on how they are sitting, distracts them from learning, and subjects them to cold temperatures on their legs and/or uncomfortable layers of leggings under their knee-length skirts in order to stay warm, especially moving outside between classrooms at the school. Defendants have offered no evidence of any comparable burden on boys.”

The school’s board is “analyzing the [judge’s] opinion and will be meeting with counsel in the very near future to discuss their options moving forward,” Mitchell, the school’s founder, told the New York Times in a statement.

Charter Day is one of many schools whose dress codes unfairly target girls — and one of many schools where students are fighting back against discriminatory policies. Not all dress code policies are as blatantly sexist as Charter Day’s was. As Nadra Nittle previously wrote for The Goods, some schools frame their rules as a way of protecting students from unnecessary distractions. Many schools have been called out for policies that sexualize young girls, including “fingertip tests” for skirts and, in one particularly egregious case, forcing a student who wasn’t wearing a bra under her shirt to cover her nipples with band-aids.

Other schools have been known to discriminate against students of color: One Massachusetts school disciplined two black students for wearing their hair in braids. At a private Christian school in Florida, a 6-year-old black boy was similarly disciplined for wearing his hair in dreadlocks.

Charter Day’s policy has been overturned, but one of the students who spurred the lawsuit no longer attends the school. “All I wanted was for my daughter and every other girl at school to have the option to wear pants so she could play outside, sit comfortably, and stay warm in the winter,” Bonnie Peltier, that student’s mother, said in a statement. “We’re happy the court agrees, but it’s disappointing that it took a court order to force the school to accept the simple fact that, in 2019, girls should have the choice to wear pants.”

Want more stories from The Goods by Vox? Sign up for our newsletter here.