Skip to content

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

Open
@dpogue

Description

@dpogue

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions