Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sambadave
Copy link

Based on % fix from @yoannisj.
Updated to allow px, %, vw and vh units in translate property.

@sambadave
Copy link
Author

I have updated this based on #28 from yoannisj to also allow px, %, vw and vh units in the translate property.

vw and vh properties work quite nicely across desktop/tablet/mobile as they are based on the viewport size and not a pixel or % value which can give undesired results across different viewport sizes.

N.B I'm no javascript expert so this could probably be written better than I have done!

Thanks @yoannisj for the initial % fix.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant