You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently getBoundingClientRect() returns a DOMRect with top, right, bottom, and left properties corresponding to the position and size of the element.
This is great, but if you are trying to use it for calculating layout positions in an RTL context, you have to do things like rect.right - window.innerWidth to get the offset from the inline starting point.
Given that many CSS properties now support logical variants, it would be nice to have a function that returned the bounding box of an element using logical property names like blockStart, blockEnd, inlineStart, and inlineEnd.
The text was updated successfully, but these errors were encountered:
Currently
getBoundingClientRect()
returns aDOMRect
withtop
,right
,bottom
, andleft
properties corresponding to the position and size of the element.This is great, but if you are trying to use it for calculating layout positions in an RTL context, you have to do things like
rect.right - window.innerWidth
to get the offset from the inline starting point.Given that many CSS properties now support logical variants, it would be nice to have a function that returned the bounding box of an element using logical property names like
blockStart
,blockEnd
,inlineStart
, andinlineEnd
.The text was updated successfully, but these errors were encountered: