Based on this previous gist, but robust to changes in browser zoom level (text inside tooltip doesn’t get cut off when zoom < 100%).
forked from jebeck‘s block: Browser-zoom robust foreignObject tooltips