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

Already on GitHub? Sign in to your account

Add support for percentage values #40

alkavan opened this Issue Apr 2, 2014 · 2 comments


None yet
3 participants

alkavan commented Apr 2, 2014

I have made a commit here: https://github.com/alkavan/move.js/commit/cd9a80a02c38c567fe7a36ab7710c0730db29fb2

This is an example of modified translateX() and translateY() methods to support passing percent values, for example translateX('60%') or translateX('-60%') would work now.

I think this is something that should be done to all types that support percent values, I can do this because I really need this functionality, but I wonder if you'll pull this changes if I'll add this to all methods, because while I don't really need this for all of methods, someone else might ...

UPDATE: also added to translate() method: https://github.com/alkavan/move.js/commit/d108addf231eaec15dcc075823246f2b20ffbc4d

hkan commented Apr 11, 2014

I use translateY(-50%) in my CSSs for vertical alignment. When I apply Move(selector).x(100) on that particular elements, the translateY gets overriden so I have to do Move(selector).x(100).y("-50%") but that breaks all the Move.js library. Support has to be added into it.


yields commented Apr 11, 2014

SGTM! pull requests are welcome!

@A A closed this in #69 Nov 29, 2015

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