title: How to get placement coordinates of an absolutely positioned element relative to another?
body: <p>I can't seem to find this on github so here we go:</p>
  
  <p>Suppose I have DOM element <code>parent</code> which contains <code>position: relative</code> and another element <code>child</code> which contains <code>position: absolute</code> and is a child of parent, how can I go about getting coordinates [top, left] for my child element [relative to parent] given some placement string? (i.e. "top left", "top middle", "bottom right", and so forth... ?)  </p>
  
  <p>Ideally, something like this:</p>
  
  <pre><code>var coordinates = getRelativeCoordinates({
    el:           child        // Child element which contains "position: absolute"
    relativeToEl: parent       // Parent container which contains "position: relative"
    placement:    "top left"   // "top left" || "top middle" || "top right" || "right top" || etc...
  });
  
  console.log(coordinates);
  &gt;&gt; {top: "-100px", left: "0px"}
  </code></pre>