Racist Comment by Partner

Avalon

While on the way to the store today my partner told me that I was being racist towards white people and at first I though he was joking, but realized that he was being serious when he tried to explain it to me. I quickly changed the subject because I wasn't sure the best way to handle it that would be productive and helpful. Is there a way I could explain to him that that's not how racism works? Preferably in a general, kind of broad way. Though also being able to explain what's wrong with those thoughts more in depth would be super great too.