Just a little correction: percentage values are computed based on the element's _containing block_, not parent.
Most of the time, an element's containing block is its parent, but not always.
For more on this: https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_...