Skip to content

Allow percentages for x/y/width/height options #2

@gilmoreorless

Description

@gilmoreorless

A suggestion was made to add helpers for testing the nearest element(s) to the top/bottom/left/right edges of the screen.
The current workaround is to use arbitrary large values (e.g. {x: 0, h: 999999} for the left edge).

What would be better is allowing percentage values, that equate to a percentage of the page's width/height, so the above example could be {x: 0, h: '100%'}

This could also allow shortcuts like {x: '50%', y: '50%'} for the centre of the page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions