When local officials and the courts pressed for construction of relatively small numbers of moderate income housing units in such upscale liberal bastions as San Francisco (Clinton 84.5 percent, Trump 9.2 percent) and neighboring Marin County, Calif. (Clinton 77.3 percent, Trump 15.5 percent), the groundswell of opposition was loud and clear.

Looking at the case of Marin County, Jonathan Rothwell, a senior economist at Gallup, first made the case in a July 2015 Brookings report, Zoning Out The Poor, that liberals have a moral obligation to support desegregation initiatives:

Segregation is a disaster for the poor. It crushes upward mobility by cutting off resources to essential public goods like quality education. Yet, in almost every city and metropolitan municipality there is a strong entrenched group committed to using political regulations to perpetuate segregation. These people are more commonly known as homeowners.

When officials in Marin County — median home value $815,100, median household income $93,297 — began plans to build affordable housing, the reaction was immediate, Rothwell wrote:

The Lucas Valley Homeowner’s Association was formed to oppose “high density development." Likewise, the Marin Community Alliance was formed “to protect and preserve the character" of the area.

The response, Rothwell continued,

is sadly typical. Since zoning’s modern origins in the 1920s, homeowner associations and other groups have banded together to keep racial minorities and non-affluent people out of their suburban municipalities and neighborhoods.

In an effort to further explore this question, I asked Jacob Hacker, a political scientist at Yale, two questions:

As the share of Democrats who are well-educated and upper middle class grows, how can the party continue to advocate redistributive policies? Can a party survive that calls on its own members to pay the costs of policies designed to help those on the bottom rungs?

Hacker replied:

The evidence is clear that even relatively affluent Democrats are more supportive of redistribution than a typical Republican — at least in opinion surveys. This general support, however, doesn’t always translate into support for pro-opportunity policies at the local level.

Affordable housing, Hacker wrote, “is far and away the best example.” Opposition to zoning allowing denser and more affordable housing “comes not just from well-off residents but also from landlords who get monopoly rents.” The inherent zero-sum thinking underlying not-in-my-backyard approaches

prevents positive-sum solutions that could reduce the economic conflict between poorer members of the Democratic coalition and the more affluent segments.

Hacker concluded his email on an upbeat note, contending that “demography is not destiny” and that Democratic leaders

could work more aggressively to identify and create positive-sum solutions — pro-growth policies that both lift up the least advantaged and attenuate class-based cleavages within its own coalition.

Arthur Lupia, a political scientist at the University of Michigan, less optimistically put his finger on the core problem for Democrats:

The Democratic Party is evolving in multiple ways that separate it from the living conditions of large numbers of working-class Americans.

The result, Lupia wrote, is that

many Democrats now know less, and appear to care less, about the day-to-day struggles of many working class Americans. Hillary Clinton is an example of a Democrat who struggled to be seen by many such Americans as having a sincere and credible grasp of their concerns.

Hacker and Lupia, while differing in outlook, together raise a basic concern about the contemporary Democratic Party: the casual, if not negligent, willingness of the party elite to adopt policies and positions, however worthy, without regard to the costs such policies impose on others.

The characteristics of the Democratic elite are best reflected in studies of delegates to the Democratic National Convention. For years, CBS surveyed these delegates but stopped doing so in 2008. Still, even without data from 2012 and 2016, the CBS surveys show a consistent pattern. Delegates are drawn overwhelmingly from the liberal upper middle class. In 2008, 70 percent of the delegates reported earning $75,000 or more per year, compared to 27 percent of Democratic voters at that time.

The Democratic delegates were well to the left of Democratic voters, a trend that continues. Seven out of ten delegates said that abortion should be generally available and 20 percent said abortion should be available under “stricter limits”; 43 percent of Democratic voters supported generally available abortion and 39 percent said under “stricter limits.”

More than 8 out of 10 Democratic delegates in 2008 agreed that “government should do more to solve national problems,” while 54 percent of Democratic voters shared that view, according to American National Election Studies. Hillary Clinton’s 2016 Democratic coalition clearly reflected the same priorities.

As the Democratic elite and the Democratic electorate as a whole become increasingly well educated and affluent, the party faces a crucial question. Can it maintain its crucial role as the representative of the least powerful, the marginalized, the most oppressed, many of whom belong to disadvantaged racial and ethnic minority groups — those on the bottom rungs of the socioeconomic ladder?

This will be no easy task. In 2016, for the first time in the party’s history, a majority of voters (54.2 percent) who cast Democratic ballots for president had college degrees. Clinton won all 15 of the states with the highest percentage of college graduates.

The steady loss of Democratic support in the white working class, culminating in Trump’s Electoral College victory on the backs of these white voters, must inevitably send a loud and clear signal to the Democratic elite: The more the party abandons the moral imperative to represent the interests of the less well off of all races and ethnicities, the more it risks a repetition of the electoral disaster of 2016 in 2018, 2020 and beyond.