Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cssom-view] Wanted: getBoundingClientRect() with logical property values #11319

Open
dpogue opened this issue Dec 3, 2024 · 0 comments
Open

Comments

@dpogue
Copy link

dpogue commented Dec 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants