function fixElementToParentBounds (element, parent) {
  const parentH = getComputedProp('height', parent)
  const parentW = getComputedProp('width', parent)

  let height = getComputedProp('height', element, parent)
  let width = getComputedProp('width', element, parent)
  let top = element.top
  let left = element.left

  // Checks if position + size gets out-of-bounds (TOO FAR), if so, reposition...
  if ((top + height) > parentH) {
    top -= (top + height) - parentH
  }
  if ((left + width) > parentW) {
    left -= (left + width) - parentW
  }

  // Checks if position is out-of-bounds (NEGATIVE), if so reposition...
  if (top <= 0) top = 0
  if (left <= 0) left = 0

  // Checks if, with a 0 position, the element is still out-of-bounds (TOO BIG), if so, resize
  if (top === 0 && (height > parentH)) height = parentH
  if (left === 0 && (width > parentW)) width = parentW

  return {left, top, height, width}
}
Fixes the properties (top, left, height, width) of an element,
based on the parent container

@param {object} element : The element to which fix its props
@param {object} parent : Parent element of the 'element'
@return {object} : Object with clean/fixed top, left, height, width properties for the element