Here is a Louisiana family court case where a man lost a custody appeal based on an assortment of minor allegations such as listening to hip-hop music and once having diapers of the wrong size. But the big issue, according to the judge, was that he violated court orders not to make racist comments by calling the kid's stepfather the N-word.
It is a stupid decision. We have a First Amendment in this country that is supposed to guarantee free speech. The judge cannot order a man to avoid making racist comments to his kid.
The father and stepfather is the case are both black. The mother is white and the kid is mixed-race. The judge is presumably some white liberal man who thinks that racial harmony can be achieved by raising a generation of kids who do not hear the N-word. It won't work because the father still has visitation privileges, and the kid will learn his opinions whether the court likes it or not. The judge is just using the kid to punish the father in order to reinforce the judge's own prejudices.