As soon as Willie Muse was invited to his cousin’s wedding in June on Massachusetts’ Cape Cod, he Googled what the “beach formal” dress code meant.

The first item that popped up was a linen suit from J. Crew that consisted of matching shorts and a blazer.

Muse, 34, loved the idea of wearing shorts to a wedding. Summer events, in particular, have never been particularly comfortable for Muse, who lives in the New York City borough of Brooklyn and works as a full-time content creator.

“I don’t know what to wear because I know I am going to end up sweating profusely by the end of the night,” he said.

But he was nervous that shorts would be considered too informal.

“The one thing you are worried about when you wear something different to the wedding is having people look at you instead of the bride,” he said. “I had a moment of panic.”

So he did what any good cousin would do: He wore the outfit to the rehearsal dinner first and ran it by the bride. “She didn’t say no,” he said, laughing.

Still, a few family members essentially did: One cousin pointed out that her 3-year-old son had worn a similar outfit to a wedding the weekend before.

An aunt told him that she had told her husband he couldn’t wear shorts to the wedding.

“She was like, ‘You are undercutting my point right now,’” Muse said.

Nevertheless, he wore the shorts.

“It’s the most comfortable suit I own,” he said — and, he added, his new go-to outfit for summer formal occasions.

Shorts, once considered a fashion faux pas at a wedding, are now the preferred attire of some wedding guests, and even some couples themselves.

Experts say it’s not just the heat waves crashing summer weddings across the country, although they have certainly played a role. It’s also the fact that fashion is evolving (short suits are in); guests are looking for fun outfits to wear to weddings to distinguish themselves; and fashion, in general, is becoming more casual, said Jules Martinez Hirst, an etiquette expert based in Culver City, Calif.

Julie Sabatino, owner of the Stylish Bride, a wedding-styling business in New York City, said she expects more people, including brides and grooms, will be wearing shorts at weddings in the future.

“You have Timothée Chalamet pushing the limits of what is cool in menswear, and that really filters through,” she said.

One of her clients, J. Winkelreid, an activist and philanthropist who identifies as nonbinary, wore shorts to their February 2023 wedding to Maddie Winkelreid in Jupiter Island, Florida. “Most people get married in pants, I wanted something different,” said the 32-year-old, who lives in New York City. “It was my own moment to really make my own while marrying my best friend.”

Still, some etiquette experts believe shorts have no place at a wedding, regardless of trends.

Hirst put it bluntly. “I understand it is going to be hot, but there are things you can wear that aren’t shorts and flip-flops,” she said.

The exception, she said, is when there is a directive from the top.

For her beach wedding in the Florida Keys last spring, Elena Marrone Filarecki, 28, a compliance analyst, knew she wanted all the men at the wedding (including her groom, Brent Filarecki, her father and the groomsmen) to wear shorts.

“I wanted the attire to be romantic and cocktail attire, but not too hot,” she said. “I also wanted everyone to be comfortable.”

On her wedding website, she specified that “dress shorts” were allowed but “no cargo pockets.”

“I also put together a Pinterest board with reference photos,” she said.

To get the right look, the groomsmen ended up buying lightweight suits and having a tailor hem them to shorts.

Elena Filarecki loved how happy and carefree everybody looked. “My dad looked so handsome,” she said. “And just like himself.”

Problems can arise, though, when guests show up in shorts without approval from the hosts.

Cassie Horrell, a wedding planner in Pittsburgh, was appalled when a friend showed up to a mutual friend’s wedding in June — it was on a vineyard in Seven Springs, Pa. — in a dress shirt, paired with shorts.

“It was a cocktail-style celebration,” she said. “If you wear shorts, it can also be a sign of disrespect.”

She said it also created unnecessary drama. “Everybody noticed, and everybody was giving him slack,” she said. “We are still talking about it” — now in The New York Times — “and it’s been months.”

It doesn’t help, said Hirst, that social settings have become more casual. “We’ve become such a lax culture,” she said. “I’ve gone to galas and seen people in jeans.” (Indeed, we are in a culture where people wear workout gear to dinner and crop tops to work.)

Some wedding guests turn to shorts while searching for something different and fun to wear.

For her best friend’s wedding in June in Boulder, Gemma Nash, 26, a software engineer in Brooklyn, wanted to wear something that would stand out. “My best friend and I are very goofy,” she said.

The dress code was “smart casual/garden party,” and she found a bright-green matching set with shorts and a blazer, which she felt would work particularly in the 90-degree weather. She wasn’t worried about wearing the ensemble, she said, because she had showed it to her friend and received her approval.

But at another wedding a month before in California, Nash ultimately balked at donning the shorts set. “I was worried it would be too casual,” she said.

She wore wide-leg satin pants instead.