Uses offsetWidth and offsetHeight instead of boundingClientRect to ensure texts are measured without regard to any CSS transform (e.g. scaling.)