Skip to content

Anchored Positioning Behavior #1021

@T-Hugs

Description

@T-Hugs

Description

Elements that are displayed on top of (covering up) other UI should do so by being placed at the root of the DOM so that their stacking order can take precedence over all siblings and their children. Therefore, these elements must be positioned using absolute positioning. In all cases, the overlay element should be positioned such that it is anchored to another element.

For example, a dropdown involves a button, which, when clicked, displays an overlay. The overlay is "anchored" to the button, with the bottom edge of the button anchoring to the top edge of the overlay.

In order to achieve this behavior, the overlay's position (as a <top, left> ordered pair, in pixels) must be calculated from the dimensions and location of the anchor element as well as the dimensions of the overlay element. This behavior is what will be referred to as "anchored positioning."

Behavior API

TBD

Usage

TBD

Implementation

An incomplete implementation is underway here.

Timeline

Part of Milestone 2 in the PRC Behaviors Epic.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions