This is a tricky one.
I need to find a way to calculate the correct position to align a box within another box at its top. However, there is CSS3 scaled content inside the inner box (the scale factor is known) so a basic based-on-top (0px) approach won't work.
As this is literally impossible to properly describe, see my jsFiddle here:
Thank You!
You're going to have to get your math hands dirty here. The basic approach will be:
0
, and a transform origin of +(box height / 2) to be 1
. Given those constraints, perform linear interpolation using the current Y origin to determine the scale factor to apply to the top edge.