Bonnie Peltier's daughter, identified as "A.P." in legal documents, is suing her public school, seeking the right to wear pants as part of the school's uniform.

Bonnie Peltier, a 47-year-old stay-at-home mother of two in Leland, North Carolina, was thrilled when her 4-year-old daughter got into Charter Day School, a publicly funded K-8 with a good reputation in her conservative small town. But she was taken aback at school orientation in the summer of 2015, when she learned that the charter school’s dress code prohibits girls from wearing pants or shorts as part of its standard uniform.

Her daughter dislikes wearing skirts and dresses, Peltier told HuffPost. And Peltier didn’t understand why she’d have to force her child to wear clothes that make it harder to play freely, and are less warm when the weather gets chilly.

To understand the school’s reasoning, Peltier emailed its founder, Baker Mitchell, a conservative entrepreneur who owns a company that manages four public charter schools in the state.

In his reply, Mitchell said the dress code was about “chivalry” and claimed it helped instill traditional values, making for better manners and better-behaved children. A fairly standard response, at the outset. But then, he suggested that the dress code could help prevent school shootings.

Peltier was shocked.

The email kicked off a years-long battle with Charter Day that has yet to be resolved. All this time, Peltier’s daughter has been dutifully wearing her school uniform.

Charter Day is the best public school in the area, Peltier said. She didn’t see why her daughter should be denied the opportunity for a good education. “I figured if I have to get the policy changed, that’s what I’m going to do,” she said. “She belongs there; the teachers are wonderful; her friends are there.”

With the help of the American Civil Liberties Union, Peltier and two other mothers sued Charter Day in federal court in 2016 on behalf of their daughters. Their aim is simply to give girls at the school the option to wear pants or shorts. They argue that the restrictive dress code discriminates against girls and violates Title IX, the part of the federal civil rights law that covers public education.

“They get public money. And they need to abide by the law,” said Erika Booth, a 47-year-old paramedic who joined the suit on behalf of her daughter. “They need to go ahead and treat girls equally. That’s it. That’s the bottom line.”

Dress codes in the U.S. have been increasingly subject to controversy for various reasons, but HuffPost only recently learned about the Charter Day case, which hasn’t garnered much national attention. A ruling could come soon on the school’s motion for summary judgment.

Lawyers for Charter Day declined to comment for this story, instead referring HuffPost to the arguments the school made in its motion for summary judgment last year. There, the school said the uniform dress code is part of its “traditional values” framework, and noted that it’s legal to have differing dress requirements for boys and girls. The policy fosters classroom discipline and “mutual respect between boys and girls,” the school argued, pointing out that parents choose the school.

Further, the school said the policy doesn’t adversely impact girls, who outscore boys at the school in standardized math tests.

Charter Day also claimed it would hurt the school to get rid of a policy that parents like. But it’s not clear parents are so fond of the code, Peltier and Booth told HuffPost. “I’ve had a lot of support,” Booth said.

A petition to change the dress code garnered more than 100 signatures, according to a 2016 blog post from a student on the ACLU’s website.

“When we go outside for recess, the boys in my class will sometimes play soccer or do flips and cartwheels,” wrote Keely Burks, who was an eighth-grader at the school. “But I feel like I can’t because I’m wearing a skirt.”

She said she’d been put in a timeout in the first grade because she sat with her legs criss-crossed, rather than curled to the side as was expected of girls.

In its arguments to the court, Charter Day does not touch on the reasoning Mitchell offered Peltier in his email in 2015, possibly because it is so outrageous. In that email, Mitchell linked the dress code to the Columbine school shooting, which he pointed out happened the year before Charter Day’s founding. He told Peltier that some of the victims were female.

In the wake of Columbine, where two high school boys killed 12 of their classmates, one teacher and themselves, Charter Day’s founders were “determined to preserve chivalry and respect among young women and men in this school of choice,” Mitchell wrote to Peltier. Young men should hold doors open for young ladies and even carry umbrellas for them, he said. Students should say “ma’am” and “sir” when addressing adults.

And today, when bullying and harassment are big issues, as well as teen pregnancy and casual sex, Mitchell said, the dress codes are just important.

The argument essentially seemed to be that dressing nicely and behaving politely will somehow prevent school violence and other social ills.

He couldn’t really be saying that Columbine wouldn’t have happened if girls wore skirts, Peltier thought while reading his email. “But that was what he was saying,” she told HuffPost.

In the court documents, Charter Day distanced itself from Mitchell’s email, saying it wasn’t an “official pronouncement.”

Mitchell and the school both emphasized that the dress code encourages a culture of respect, but Peltier and Booth say the unequal policy is actually disrespectful to girls, who are treated as the fairer, and thus less capable, sex ― outdated tropes that perpetuate sexism.

“I think it teaches girls they’re second-class citizens. They take second place to the boys. And it’s not right,” Booth said. “My daughter has aspirations to do things that are traditionally men’s jobs. She wants to be a soldier. I’ve never seen a soldier in a skirt.”

This Charter Day eighth-grader, identified in the suit as "I.B.," would just rather wear pants or shorts to school.

If schools are really concerned with fostering a culture of respect, they should make sure that students are comfortable, welcome, safe and happy in their learning environment, said Adaku Onyeka-Crawford, senior counsel for education at the National Women’s Law Center.

But gendered dress codes don’t actually work toward those goals. Skirts and dresses are indeed less comfortable, it’s harder to play when ensconced in fabric past your knees, and in the winter months, girls are colder.

Dress codes also can work against the notion of respect ― particularly for girls, who are treated more like fragile, sexualized objects than autonomous human beings. “There tend to be more rules for girls than boys,” Onyeka-Crawford said. “It tends to be another way to police girls’ bodies.”

There’s no nationwide data on the use of gendered dress codes in schools, but they’re not uncommon. Schools often mandate the length of girls’ skirts or prohibit certain kinds of tops ― spaghetti straps, for example. Meanwhile, boys are allowed to get away with a bit more ― say, playing basketball shirtless.

Over the past year, these prohibitions have been called out for sexualizing, stereotyping and harming young women. Black girls, in particular, are often burdened by dress codes, which can ban styles specific to their cultures, such as certain hairstyles.

Gendered dress codes also help reinforce damaging stereotypes about boys and girls. Girls at the Charter Day school have been told to “sit like a princess” or “sit like a girl” in the classroom, and have been reprimanded for turning cartwheels on the playground (and inadvertently showing their underpants), according to the lawsuit.

“We’re having to tell our daughters, even though this is what they’re teaching you, this is not the way the world works anymore,” Peltier said.