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

Normalizing some options now that noZepto #16

Open
lyzadanger opened this issue Apr 23, 2014 · 1 comment
Open

Normalizing some options now that noZepto #16

lyzadanger opened this issue Apr 23, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@lyzadanger
Copy link

Hi @tylersticka

I'm seeing a couple of values getting computed for default options that I think are partially vestigial from Zepto. Specifically:

duration:               ($.fx !== null) && ($.fx.cssPrefix !== null) ? $.fx.speeds._default : 400,

and

cssPrefix:              ($.fx !== null) && ($.fx.cssPrefix !== null) ? $.fx.cssPrefix : '',

Not a lot of Google hits for $.fx.cssPrefix but it does appear to be Zepto-related. What are sane defaults for these now that jQuery is the only game in town?

@tylersticka
Copy link
Member

This is a great question!

I believe $.fx.speeds._default should be present in jQuery. I believe it was not always present in Zepto, but was added in a later release. I thought it might make sense to default our effect speeds to jQuery's default, but that may not be necessary. In fact, I'm not sure I even checked to see what happens if you pass null as a duration to animate... I'll feel pretty sheepish if it just uses the default!

$.fx.cssPrefix is Zepto-specific. When we use the transform properties later on, Zepto does a little bit of work for us in that it determines the appropriate CSS prefix to use (if any).

If I were you, I would (for now) work on getting the plugin fully functional without the transform properties (just left/right), then we can revisit our recommendations for doing the fancy-schmancy CSS-powered versions (could be cool to use transit if it's included, fallback to animate and left/right if not... or maybe that's an option).

@lyzadanger lyzadanger added this to the v2.0.0 milestone Apr 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants