While media attention focuses on proposed state legislation to deny rights to L.G.B.T.Q. people, there are probably more examples of bipartisan pushes to protect or expand those rights.

According to Freedom for All Americans, an advocacy group, more than two dozen Republican lawmakers in 15 states recently sponsored legislation to protect gay or transgender people from discrimination. They include the chairman of the Republican Party in Florida and the State Senate majority leader in West Virginia. Republican lawmakers were crucially involved in blocking discriminatory measures proposed in Texas, Tennessee and Georgia, the group said. In South Dakota, where Republicans control both chambers of the Legislature, four different measures to permit discrimination against transgender people were defeated this year.

That reflects Americans’ values more accurately than the Trump administration does. In a Quinnipiac University poll in April, 92 percent of Americans said that employers should not be allowed to fire someone based on his or her “sexual orientation or sexual identity.” When Americans are asked whether a full spectrum of civil rights protections should be extended to L.G.B.T.Q. people, the number falls — but a majority of 53 percent still say yes. And in poll after poll, most Americans say that transgender people should be able to serve in the military, with 70 percent of them indicating support in one survey.

Yet the Trump administration keeps tugging in the opposite direction. Trump has nominated and the Senate has confirmed many jurists with explicit, unabashed hostility to gay and transgender rights, including, just days ago, Matthew Kacsmaryk, who received a lifetime appointment as a United States district judge for the Northern District of Texas. This is a man who in 2015 wrote that gay rights were part of a sexual revolution that was “rooted in the soil of elitist postmodern philosophy” and “sought public affirmation of the lie that the human person is an autonomous blob of Silly Putty unconstrained by nature or biology, and that marriage, sexuality, gender identity and even the unborn child must yield to the erotic desires of liberated adults.”

The choice of Kacsmaryk is hardly an aberration, said Sharon McGowan, the chief strategy officer and legal director for Lambda Legal, an advocacy group that has been tracking these appointments to the federal bench. “The arc of history may bend toward justice,” she told me, “but history will not be kind to those who are complicit in what has been happening over these past two years.” She meant in the White House, in the cabinet and on Capitol Hill, where a stubbornly retrograde social conservatism holds sway.

“It’s a 180-degree turn from the Obama administration,” said Shannon Minter, the legal director for the National Center for Lesbian Rights and a transgender man. Therein lies part of the explanation: If Trump’s predecessor did things one way, he’s inclined to do the opposite. “It has been shocking to me,” Minter added. Trump’s relatively benign comments before being elected did nothing to prepare Minter for the ban on openly transgender people in the military and for his administration’s edicts, efforts or declared intentions to eliminate protections for transgender people in the Affordable Care Act, allow health care workers to cite religious beliefs in refusing to treat gay or transgender people, let federally funded housing shelters deny access to transgender people, make it easier for adoption agencies to turn away same-sex couples and more.

“I wonder if they’re doing it out of this weird muscle memory left over from the days when launching an attack like this would be useful if you were under fire on other issues,” Buttigieg told me. “If people were displeased with Republicans on the economy, throw out a marriage referendum to fire up your base!”