old_contents: export const getViewport = () => ({
    height: window.innerHeight || document.documentElement.offsetHeight,
    width: window.innerWidth || document.documentElement.offsetWidth,
  });
  
  export const isElementOverflowing = element =>
    element.clientWidth < element.scrollWidth || element.clientHeight < element.scrollHeight;
  
new_contents: export const getViewport = () => ({
    height: window.innerHeight || document.documentElement.offsetHeight,
    width: window.innerWidth || document.documentElement.offsetWidth,
  });
  
  export const isElementOverflowingX = element =>
    element.clientWidth < element.scrollWidth;
  
  export const isElementOverflowingY = element =>
    element.clientHeight < element.scrollHeight;
  
subject: Split up util function to detect horizontal & vertical overflowing separately