A Supreme Court ruling will sharply limit the use of race when drawing electoral districts in the US.