As the mercury rises across the country, so, too, do the hemlines.

But that has many students at odds with their school dress codes, as educators in a number of districts have begun to crack down on outfits that show too much skin.

A Montreal student was suspended earlier this week for violating a school dress code.

School officials at Beaconsfield High School came to Lindsey Stocker’s class for a clothing inspection and singled out the Grade 11 student for not adhering to the dress code. She refused to go home and changeout of her “short shorts.”

Stocker had reportedly also posted posters around her school that read: “Don’t humiliate her because she is wearing shorts. Instead of shaming girls for their bodies, teach boys that girls are not sexual objects.”

School officials in Montreal said a  governing board of staff, parents and students review the dress code every year.

“We’re trying to teach them how to be ready for life when they graduate high school, be it university or perhaps a job,” Suanne Stein Day, of the Lester B. Pearson School Board, told CTV News.

“If they went and got a job at McDonald’s, they’d have to wear a hat. If they didn’t like the hat-head they got, it’s too bad.”

Stocker isn’t the only one to be punished for her spring attire this year.

Two weeks ago, a Truro, N.S., mom launched an online petition to have school dress codes re-evaluated after her daughter was given detention for wearing short shorts to school. That petition had more than 7,500 signatures as of Sunday afternoon.

The petition asks for Nova Scotia educators to do away with “completely ridiculous” dress code rules.

Some schools are trying to be as clear as possible about their standards of dress. Earlier this week, a New Brunswick school sent students home with photos of what is and isn’t acceptable to wear at school. Tank tops, bra straps, baggy jeans, short dresses and short shorts were all unacceptable, school officials said.

In the United States, one Utah school took the dress code into its own hands by digitally altering yearbook photos for students it believes were showing too much skin. Necklines were added and sleeves were digitally raised or imposed.

Dr. Patricia Dold, a gender studies professor at Memorial University, says such dress code rules “disproportionately affect” female students.

With files from CTV Atlantic and CTV Montreal