A constitutional right to leggings and long hair? When are school dress codes unfashionable?

Momentous advances in free-speech law don’t always involve historic acts of journalistic courage. Sometimes they start with something as tiny as a kid who doesn’t want a haircut.

That’s what led a Chicago-based federal appeals court to conclude that it can be unlawful gender discrimination to make male high-school athletes, but not female ones, wear their hair short.

In a 2-1 ruling issued in February, the federal Seventh Circuit decided that gender-based dress and grooming codes can violate both the federal Title IX gender discrimination statute as well as the Equal Protection Clause of the Fourteenth Amendment.

In sending the case back for trial, the appeals court in Hayden v. Greensburg Community School Corp. indicated that the school can still prevail if it shows that a school rule — requiring only boys, but not girls, to cut their hair short to play basketball or baseball — is part of a comprehensive grooming code that, while not necessarily equivalent across the sexes, is at least comparable.

The Hayden case provides interesting new avenues for challenging dress codes such as the “no leggings” rule that’s currently provoking protests at a middle school in Evanston, Ill. (The school has attempted to justify the rule by arguing that girls’  leggings are distracting boys from concentrating on schoolwork, a rationale that some critics have labeled the tween equivalent of “slut shaming.”)

As Time‘s Eliana Dockterman wrote in recounting her own experience with dress-code banishment — punishment that almost always is counterproductively more distracting than any outfit could be — disciplining girls because boys can’t stop staring at them seems to misplace responsibility for behaving professionally in a work-like setting. (It’s also a form of the same faulty logic that prompts colleges to ban or disinvite guest speakers because some audience members won’t be able to restrain themselves from acting disruptively.)

While schools can lawfully enforce gender-based dress and grooming requirements consistent with common social norms (e.g., that boys can play basketball shirtless but girls can’t), differential treatment based on gender must be justified by some reasonable basis beyond the subjective style preferences of the decisionmaker. (As the court in the Hayden case pointed out, female basketball players need their hair out of their eyes just as much as males, so there seems to be no athletically based need for the boys-haircut rule.)

As we reported in February, a panel of the California-based federal Ninth Circuit recently decided that requiring students to wear clothing with a disagreeable school motto can violate the First Amendment as a form of “compelled speech.”

The takeaway from these cases is that, while judges are strongly inclined to defer to schools in matters of fashion and grooming, it’s still quite possible to win a constitutional challenge if the school’s justification for limiting (or compelling) speech is a weak one.