Partisan divisions are not new news in American politics, nor is the assertion that one cause of the deepening polarization has been a demonstrable rightward shift among Republicans. But a more recent leftward movement in attitudes among Democrats also is notable and has obvious implications as the party looks toward 2020.

Here is some context. In 2008, not one of the major candidates for the Democratic presidential nomination advocated legalizing same-sex marriage. By 2016, not one of those who sought the nomination opposed such unions, and not just because of the Supreme Court's rulings. Changing attitudes among all voters, and especially Democratic voters, made support for same-sex marriage an article of faith for anyone seeking to lead the party.

Trade policy is another case study. Over many years, Democrats have been divided on the merits of multilateral free-trade agreements. In 1992, Bill Clinton strongly supported the North American Free Trade Agreement (NAFTA) in the face of stiff opposition from labor unions and others. He took his case into union halls, and while he didn't convert his opponents, he prospered politically in the face of that opposition.

By 2016, with skepticism rising more generally about trade and globalization, Hillary Clinton was not willing to make a similar defense of the merits of free-trade agreements. With Sen. Bernie Sanders (I-Vt.) bashing the Trans-Pacific Partnership (TPP) as a presidential candidate, Clinton joined the chorus of opponents. She ended up on the opposite side of then-President Barack Obama, even though she had spoken warmly about the prospects of such a treaty as secretary of state.

Looking ahead to 2020, something similar is likely to take place on the issue of health care. Because of changing attitudes that already are underway within the party, it will be difficult for any Democrat seeking the nomination not to support some kind of single-payer health-care plan, even if big questions remain about how it could be accomplished.

Sanders used his 2016 presidential campaign to advocate a universal health-care plan that he dubbed "Medicare for All." The more cautious Clinton, who saw flaws in what Sanders was advocating, argued instead for focusing on improvements to the Affordable Care Act.

Sanders has now introduced a "Medicare for All" measure in the Senate, and his co-sponsors include several other prospective candidates for the Democratic nomination in 2020.

Meanwhile, a majority of House Democrats have signed onto a single-payer plan sponsored by Rep. John Conyers Jr. (D-Mich.) that goes much further. This has happened even though some of those who like Conyers's idea in principle question whether it is ready for prime time, not only because of the potential cost and the absence of a mechanism to pay for it, but also because of other potential policy flaws as well.

The pressure to embrace single-payer plans grows out of shifts in attitudes among Democrats. The Pew Research Center found in June that 52 percent of self-identified Democrats now support a government-run health-care system. That is up nine points since the beginning of the year and 19 points since 2014. Among liberal Democrats, 64 percent support such a plan (up 13 points just this year) and among younger Democrats, 66 percent say they support it.

Health care isn't the only area in which Democratic attitudes are shifting significantly. Others include such issues as the role of government and the social safety net; the role of race and racial discrimination in society; and immigration and the value of diversity.

A few days ago, the Pew Center released a comprehensive survey on the widening gap between Republicans and Democrats. The bottom line is summed up by one of the opening sentences in the report: "Republicans and Democrats are now further apart ideologically than at any point in more than two decades."

This poll is the latest in a series of surveys dating to 1994. Together they provide not just snapshots in time, but also an arc of the changes in public opinion. Republicans moved to the right harder and earlier than Democrats began moving left, and their base remains more uncompromising. But on a number or questions, the biggest recent movement has been among Democrats.

In its new survey, Pew found the widest partisan gap ever on the question of whether government should help those in need — primarily because of recent shifts among Democrats. From 2011 to today, the percentage of Democrats who say government should do more to help those in need has jumped from 54 percent to 71 percent.

Only a minority of Republicans (24 percent) say government should do more for the needy, and that figure has barely moved in the past six years. The Republicans shifted their views from 2007 through 2011, the early years of the Obama presidency, during which their support for a government role dropped by 20 percentage points.

Two related questions produce a similar pattern among Democrats. Three in 4 Democrats say that "poor people have hard lives because government benefits don't go far enough to help them live decently," up a dozen points in the past few years.

Eight in 10 Democrats say the country needs to continue to make changes to give blacks equal rights with whites, up 18 points since 2014. And more than 6 in 10 say "racial discrimination is the main reason many black people can't get ahead these days," up from 4 in 10 three years ago.

Meanwhile, only a quarter of Republicans agree with the statement on government benefits, fewer than 4 in 10 say the country needs to continue to do things to provide equal rights for blacks, and just 14 percent cite racial discrimination as the main reason many blacks can't get ahead.

Members of both parties have become more positive in their attitudes about immigration in recent years, but the partisan gap remains huge — 42 points in the new survey. Today, 84 percent of Democrats say immigrants strengthen the country through hard work and talents, up from 48 percent in 2010. In 2010, 29 percent of Republicans agreed with that statement; today, that's risen to 42 percent.

Why have Democratic positions moved so dramatically and so recently on these questions race and government and immigration? Though it is not explicitly addressed in the survey, one possible reason is a reaction to the 2016 campaign and the Trump presidency.

President Trump obviously found strong support for his controversial views on immigration, whether his call to build a wall on the U.S.-Mexican border or to bar refugees from countries mostly in the Middle East. Those pronouncements helped him win the presidency. But those policies and the rhetoric that often preceded them also produced a strong backlash from the president's opponents.

The 2016 campaign ended up highlighting issues of national identity — race and immigration and the shifting character and face of the country — in often divisive ways that unleashed the kind of ugliness seen in Charlottesville in August.

The Democratic Party is being shaped by the Trump presidency and by reactions to the president among rank-and-file Democrats. Party leaders have been taking notice since Trump was sworn in as president and have moved as well.

Those who seek the party's nomination in 2020 understandably will be guided by these sentiments. But they must find a way to harness the movement into a political vision that is attractive to voters beyond the Democratic base — a vision that is grounded not just in anti-Trump resentment but in fresh and sound policies as well. In such polarized times, that will not be easy.