This is a common simplified version of the “parties switched on race” story. There was a realignment driven significantly by civil rights, but both parties contained segregationists and reformers at different times, and the drivers were a mix of electoral incentives, ideology, social movements, and backlash — not a straightforward morality play of one side cynically abandoning racism while the other welcomed it.