For me, detachment means treating them as if they were a stranger I met in a grocery store. I still interact, and do so with as much dignity as I would give any other human I met casually, but...
But I also always have an exit strategy at hand, whether it's caller ID for phone calls, or "someplace I have to be" for dinners or a distraction like going to see a show where you don't really interact much at all.
And I don't get involved in their issues. If I hear any griping from one about the other, I now have a pat reply of "wow, sounds like that bothers you, maybe you should talk to (other party) about it".
I've found tools that allow me to continue to be involved with them, without getting sucked into the mess.
That being said, there was a point in time where I was ready to go full on "no contact" because things had become entirely too unhealthy for me. If such a situation were to arise again, I would have no qualms doing that. After all, I only get one shot at life, and I'd rather not spend it being miserable about a problem that really isn't even mine.