Why .offsetParent returns the closest table for a non-positioned item

From MDN documentation toElement.offsetParent :

The HTMLElement.offsetParentread-only property returns a reference to the object that is the closest (closest in the hold hierarchy) positioned element. If the item is not located, the nearest table, table cell, or root element is returned offsetParent

Why .offsetParentdoes it return the nearest table if the element is not located (i.e. position: static)? Why doesn't it .offsetParentalways return the closest positional element?

I know that the answer to my question is because standard says so, but why did the developers of the standard decide what was the purpose for this solution?

+4
source share

Source: https://habr.com/ru/post/1686690/


All Articles