Pre-sixties, the Democrats based their appeal on white animus, while the GOP based their appeal upon anti-immigrant xenophobia and class privilege. White supremacy vs merciless capitalism (with a side of white supremacy).
In the sixties, the GOP overtly moved into the white animus territory. The Dems, in response, shifted to a mix of faux-populism and exploiting the fear of white animus.
The Black community didn’t shift to the Dems because the Dems became non-racist. They shifted because the GOP betrayed them (again). White supremacy remained an overt part of the Democratic party long past the 1960’s.