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

FLIP animation on list with display: flex #8

Open
lbineau opened this issue Apr 5, 2018 · 6 comments
Open

FLIP animation on list with display: flex #8

lbineau opened this issue Apr 5, 2018 · 6 comments

Comments

@lbineau
Copy link

lbineau commented Apr 5, 2018

I created a small demo here: https://codesandbox.io/s/j1v9387zqy

If .items has display: block and .item has display: inline-block everything is working fine.
But if .items has display: flex the items are acting weirdly when you remove them.
I think it is because when you position: absolute an item in a flex container it goes to (0, 0) coordinates instead of staying at the same coordinates.

I don't think it is a bug but could worth to mention in the readme for lists.

@lbineau
Copy link
Author

lbineau commented Apr 5, 2018

Possibly related to #6 and #4

@lbineau
Copy link
Author

lbineau commented Apr 5, 2018

Definitly not a bug of your library or vue transition group

@cristijora
Copy link
Collaborator

Hey @lbineau Trying wrapping the whole thing in another div
https://codesandbox.io/s/jl26mr9r7y

So each element even if it has "absolute" position it becomes absolute for the parent and therefore won't jump to the start of the container.

@lbineau
Copy link
Author

lbineau commented Apr 6, 2018

Thanks for your anwser. In this case the display: flex is pointless because it applies only on the new wrapper div and not the children items. The children items are inline only because of inline-block (forgot to remove it in my previous example) https://codesandbox.io/s/xr64o77z1o
My real use case is a flexbox grid, so it won't work with a wrapper around the cells https://foundation.zurb.com/sites/docs/xy-grid.html

@lbineau
Copy link
Author

lbineau commented Jun 27, 2018

Any news about this issue?

@AlexDaniel
Copy link

Hah! I stumbled upon this ticket because I was trying to figure out an issue with vuetify animations. Basically, my issue is that FLIP animations are working perfectly, except when the removed element is at the start of any line. In that case the element is immediately taking 0 space, which gets it wrapped to the previous line immediately. In all other cases everything is working perfectly. I tried adding display: flex and flex-wrap: wrap, and immediately got the problem described in this ticket. 🤷 What I can't figure out is that in some cases it seems to be working quite well (although I haven't tested it extensively), so it feels like there's a combination of divs and their display properties that do work, but I haven't figured it out yet.

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