Since the 1970s, the Republicans are moving to the right, both in economic and social issues. The Democrats are not moving to the left in economic issues, but they are moving to the left in social issues. So, American partisan politics is becoming more polarized from the 1970s to the 2010s.
However, the public opinion is not polarizing. The percentages of liberals, moderates and conservatives remained stable from the 1970s to the mid-2000s, and only after that the percentage of liberals and conservatives increased a little bit and the percentage of moderates decreased a little bit.
If the voters are not becoming very polarized, why did the parties become so polarized?
Gerrymandering.