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

Using transform: translate3d breaks any fixed position children (sticky headers for example) #84

Closed
lauriejones opened this issue Apr 26, 2016 · 2 comments

Comments

@lauriejones
Copy link

This is a specific use case that won't affect everyone but thought I'd let you know.

I am using this carousel to display a number of products. Each of these products has a header, a long-ish product description and then a footer. These product headers are sticky in that they become position:fixed; once they reach the top of the window and then scroll with you.

There is a known bug with css that stops position:fixed from working when the element or parent has been transformed: http://meyerweb.com/eric/thoughts/2011/09/12/un-fixing-fixed-elements-with-css-transforms/

To solve this we have had to revert back to an earlier version that still uses left to position the carousel. If this could be a configurable option(translate or left), that would be ideal. I understand the animation benefits of transitioning the translate property over the left property so it would make sense that that is the default.

Completely understand if this is not something you are interested in, otherwise I could work on getting a PR together.

Cheers,
Laurie

@kenwheeler
Copy link
Contributor

PR would absolutely be welcome for this. I've dealt with this in my slick.js project and I have the option there. Perhaps a useTransforms prop?

@sarmeyer
Copy link
Member

@lauriejones I realize it's been quite a while since this issue surfaced and there have been some major refactors and updates to Nuka since then - if this is still an issue for your implementation of the carousel, please let us know by reopening this issue and including a sandbox or example/gif of what you're seeing so we can try to reproduce. Thanks!

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

No branches or pull requests

3 participants