Julian Zelizer is a history and public affairs professor at Princeton University and the editor of "The Presidency of Barack Obama: A First Historical Assessment," a new book that Princeton University Press plans to publish this March. He's also the co-host of the "Politics & Polls" podcast. Follow him on Twitter: @julianzelizer. The opinions expressed in this commentary are his own.

(CNN) What's good for Donald Trump might not be good for the GOP, and the evidence of the growing risks become clearer by the day. As the nation watched the President respond to the horrific shooting in Florida, with the commander in chief doing almost everything possible to direct the conversation away from gun control and toward mental health, it was reminded of just how far to the right stands the Republican Party of Trump.

The only voice of real leadership came from former President Obama, the titular head of the Democratic Party, who reminded us that "we are not powerless" to curtail this violence. "Common-sense" gun laws, he argued, were "long overdue." Meanwhile, the head of the Republican Party sounded a different note.

None of President Trump's conservatism should come as a surprise. Trump made a bet in 2016 that by playing to the most hardline elements of his party -- the anti-immigration activists, the conservative evangelicals, the NRA aficionados, the climate change skeptics and the deregulatory zealots -- he could win.

His instinct was that the Republican Party had moved so far to the right during the past two decades that all Republicans would be willing to remain loyal to the party no matter how extreme his arguments sounded to the general electorate. Republicans like Jeb Bush were out of touch with the party they helped build.

Trump was spot on. With a booming economy behind him, there is evidence that he might be able to govern this way. His recent rebound in the polls and his series of legislative wins has sent some Democrats scrambling to rethink their "everyone must not like him" strategy.

But if we step back and look at the long term, the GOP might be in the process of marginalizing itself. Each time that the President stands as the voice of a reactionary Republican Party -- the party of the white male backlash -- and Republican leaders do nothing to stop him other than wince and whine, the party moves farther away from the goal of creating a durable political coalition.

Almost every time that President Trump confronts an issue, he leans to the right. With immigration, Congress is dealing with a crisis of President Trump's own making. It was the President who decided to dismantle DACA, the Dreamers program, leaving the lives of hundreds of thousands of children whose only crime was to be born into the families of undocumented immigrants hanging in the balance.

Now, Congress has little more than a week to fix what he did. But in exchange for his agreement, he is insisting on draconian anti-immigration measures that include heightened border patrols, America's version of the Berlin Wall, undoing much of Lyndon Johnson's 1965 immigration reforms and toughened deportation policies.

In doing so, he is championing the anti-immigration wing of the party, which has been expanding in strength since the 1990s, resisting any effort, whether from a Republican President like George W. Bush or a Democratic President like Obama, to pass immigration reform that would include a path to citizenship.

When a bipartisan coalition put forth legislation that met the President more than half way, he said no. President Trump has legitimated these anti-immigrant voices as being the face of Republican Party politics. Given the strength of immigrant populations throughout the country and the way in which those immigrants are woven into the fabric of suburbs, exurbs, and cities all over America, the Republicans might really be paying the price at the ballot box in years to come.

As the #metoo movement put issues of gender rights front and center on the national landscape, President Trump's general response has been hesitation or downright opposition. Other than the case of Sen. Al Franken, a top Democratic senator who some wanted as a presidential candidate in 2020, Trump has nothing to say.

Indeed, his tin-ear response about the news of White House staff secretary Rob Porter's history of domestic abuse allegations, was to take a shot at the #metoo movement. He tweeted: "People's lives are being shattered and destroyed by a mere allegation. Some are true and some are false. Some are old and some are new. There is no recovery for someone falsely accused -- life and career are gone. Is there no such thing any longer as Due Process."

That was it until recently when under pressure he explained that he was "totally opposed" to domestic violence. With the head of the Republican Party waffling on these issues amidst the shocking revelations the nation has seen of degrading and abusive behavior by men in power, the party faces steep losses among millions of women voters.

And on gun control, the clear political benefits that the GOP accrues from its 2nd Amendment stance makes it challenging to broaden the coalition into areas of the country, such as blue-state suburbs, where moderate voters are turned off by the idea of doing nothing in the face of mass shootings such as last week's tragedy in a Florida high school.

The gun-rights fanaticism of the Republican Party is out of touch with a majority of the electorate. Nor was the president alone in his response. Speaker of the House Paul Ryan had the same instinct -- to focus on mental health, not regulating guns.

Polls consistently show that voters back stricter gun control measures. Although Democrats have certainly not been angels on this question, with many in their party also singing the tune of the NRA, there has been much more variation -- with supporters like President Obama taking a tougher stand. With each manifestation of our national sickness in accepting loose gun laws in the face of tragedies like these, more voters will be reminded of the costs of sticking to the status quo. Sure, bad things can still happen without guns. But allowing such easy access to these weapons clearly does not help.

President Trump has also made clear what the social priorities are for the GOP in 2018. As the Republicans blow up the deficit so that they can have massive corporate tax cuts, the White House is helping enable Ryan's ongoing mission to go after the social safety net. President Trump's proposed budget would cut money for housing, food stamps, Medicaid and more. It is the Great Society in reverse.

Even on a traditional Republican issue like law and order, Trumpian Republicans are causing immense damage. This is not all new, either. There have been Republicans who have been consistently skeptical of law enforcement agencies. We saw them when President Clinton was in office, attacking the President for his strong-armed response to white extremist groups and the Oklahoma City bombing.

But now, they are out in full force.

The President's incessant, full-throated attack on special counsel Robert Mueller, the FBI and intelligence agencies warning the nation about Russia, a discrediting campaign which congressional Republicans have worked with the White House to achieve, pits the GOP against law enforcement.

This is an extremely risky move, especially since the FBI remains popular with a majority of the country. Mueller's indictment against 13 Russians for alleged election interference Friday was a stark reminder of the substance behind an investigation that Trump has attacked as "fake news."

Follow CNN Opinion Join us on Twitter and Facebook

None of the problems that the Republicans are creating for themselves means automatic victory for the Democrats, who have their own issues and have to prove that they can take advantage of this opportunity.

Still, if Democrats can do this, Republicans will pay a steep price for the way in which they have tarnished the party's brand name. Karl Rove's dream of building a governing coalition as grand as what FDR achieved in the 1930s or Reagan in the 1980s will remain just that, a dream.

As President Trump solidifies the extremist image of Republicans, they risk losing the support of moderates, independents and even party stalwarts who keep finding it harder to claim proudly that they are card-carrying members of the Grand Old Party.