FWIW, I remember reading this idea somewhere else, probably stack, so credit to whoever first figured this out.

POC: https://jsfiddle.net/moagrius/7tweemzo/