I was able to get it working with a white background:
But in cases where the background isn't white, the solution doesn't work as well:
It should be quite obvious what I did any why it doesn't work (negative margin + background set to background color). Are there any solutions to make it always look good?