I don't think it's illegal in any way. I do think it's a dangerous and impractical strategy to not do business with anyone with a mainstream political belief different than my own. I can understand with extreme views, but on an issue like this I'd prefer discourse over further polarization.
It doesn't sound like such a bad idea until it's applied to people/businesses with your beliefs.
It doesn't sound like such a bad idea until it's applied to people/businesses with your beliefs.