Skip to content

Laggy animation when (un)collapsing cards #20600

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

Closed
aimeos opened this issue Aug 31, 2016 · 6 comments
Closed

Laggy animation when (un)collapsing cards #20600

aimeos opened this issue Aug 31, 2016 · 6 comments

Comments

@aimeos
Copy link

aimeos commented Aug 31, 2016

OS: Ubuntu 14.04, Browser: Firefox 48 (but browser independent)

When opening/closing nested cards, the animation is choppy due to the
.card-block{ padding:1.25rem; }

https://jsbin.com/geyenovizo/edit?html,output

@tomlutzenberger
Copy link
Contributor

Can confirm! (Same OS/Browser)

@netowp
Copy link

netowp commented Aug 31, 2016

Same thing using Chrome on a late 2012 iMac.

@cvrebert
Copy link
Collaborator

cvrebert commented Sep 1, 2016

Can we blame the browser vendors, or is a legit reason for padding to be bad when animations are involved?

@cvrebert cvrebert changed the title Laggy animation when opening/closing cards Laggy animation when (un)collapsing cards Sep 1, 2016
@tomlutzenberger
Copy link
Contributor

The problem doesn't appear if you either set box-sizing: content-box or disable the padding. (Did this just for testing purpose and problem isolation).

It might be a calculating issue in the collapse.js

@eliottrobson
Copy link

I have seen the same thing many times on many different websites with varying implementations. I'd go as far as saying that wrapper elements would be a good use case for animations when padding is concerned.

@mdo
Copy link
Member

mdo commented Oct 9, 2016

Can we blame the browser vendors, or is a legit reason for padding to be bad when animations are involved?

We can blame them, but it's an issue with how they height is being calculated. It pulls the height, then adds/removes the padding I believe. This has been a problem for us since we coded v3 fwiw.

Fix inbound though.

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

6 participants