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

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

gilmoreorless opened this issue Jun 17, 2012 · 1 comment


Copy link

commented Jun 17, 2012

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.


This comment has been minimized.

Copy link
Owner Author

commented Oct 23, 2012

Added support for percentage strings in version 1.2. A demo is at

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.