High school students, known to push rules to their limits, say dress codes designed to foster respect and safety discriminate against about half the population: girls.

Some say the rules appear to be targeted at females, such as not being allowed to wear tops with spaghetti straps or shorts above the kneecap. Torn jeans, a current fashion trend, are specifically prohibited at many schools.

This appears to be the rule that tripped up a girl at Forest Hill High School in . She wore jeans with a big hole in the right knee. Here’s what her mother, Palm Beach County Mayor Melissa McKinlay, posted on Facebook on Sept. 13:

“In the middle of a quiz in her (International Baccalaureate) History class, a male administrator came to classroom, told her she needed to consider the guys in her class and their hormones when choosing her wardrobe, yanked her out of class and threw her into In School Suspension for the remainder of the day.

“I’m sorry but EXCUSE ME? Perhaps she should have worn a different pair of jeans. But why should she have to worry about dressing a certain way to curtail a boy’s potential behavior? So, like, it’s her fault if the boy touches her because of what she was wearing?”

McKinlay called the incident, “Sexism. Victim blaming. Girl shaming.”

She followed up the next day with a post saying she had spoken to the school’s principal and school board members and the situation has been resolved.

“My daughter indeed violated her school‘s dress code and she will bear the consequences of that,” she wrote. “But such a violation never warrants the experience she had yesterday.”

McKinlay declined further comment this week and declined to let her daughter be interviewed. also declined comment.

Fifty-five percent of high schools enforced a strict dress code in the 2015-16 school year, according to the National Center for Education Statistics, which analyzes education data.

Parents and students across the country have been rising up to complain about these rules, which they say are too often carried out against girls.

In Bradenton last year, a student was reprimanded for not wearing a bra. In Beaufort, S.C., a girl was suspended for wearing a skirt that was too short. She posted on Instagram: "I learned something very important about myself: I am a whore."

Palm Beach and Broward’s policies say they are intended to maximize learning by minimizing clothing distractions that could interfere with education. The details are typically explained to students early in the school year, although schools sometimes have to improvise as the year proceeds.

In 2015, students at informing them that graduating boys must wear dark pants and ties, and girls had to wear dresses or skirts — no slacks — to graduation. Some parents were furious, saying pants are appropriate for girls on such occasions.

Such girl targets are typical, some high school students said. Many have had experiences similar to McKinlay’s daughter. They acknowledged that their fashion choices sometimes break the rules, but said boys do the same and face no consequences.

“It’s like boys can’t learn without us being covered,” said Julia Blakesberg, 15, a sophomore at Olympic Heights High School in . “A lot of guys wear short shorts or rips in their jeans and they don’t get dress-coded.”

Blakesberg said she got a verbal warning for wearing ripped jeans and was told to stop wearing pajamas to school because they are “not lady-like.”

Sophia Cosie, 15, a sophomore at Spanish River High in Boca Raton, said a teacher told her last year that her tank top resembled what a striptease dancer might wear. Cosie covered up with a jacket.

“It hurt my self-esteem more than anything,” she said. “I see boys walking around with muscle shirts and they don’t get in trouble.”

A Spanish River administrator said girls’ clothing does lead to more dress-code warnings because their options are more diverse.

“We do have more issues because of the short shorts, the spaghetti straps, the stomachs showing,” said Ira Sollod, assistant principal. “With guys, other than if their pants are too low or they’re wearing a tank top instead of sleeves, it happens less often.”

He said students get several warnings before they face discipline, which could include a detention or their parents being called.

From a male student perspective, student Natan Solomon at West Boca Raton High said he has never seen a boy cited for his garments but notices girls get in trouble “a couple times a day.”

“It is distracting when girls show their cleavage or their [butt] cheeks are out,” said Solomon, 16, a junior. “There’s less opportunity for boys to wear clothing like that. I’m not going to show my shoulders or midriff. But boys do get away with it most of the time.”

Lsolomon