Skip to content

[css-height] Is it possible to improve browser rending performance of animating height? #849

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
sdras opened this issue Jan 2, 2017 · 3 comments

Comments

@sdras
Copy link

sdras commented Jan 2, 2017

https://www.w3.org/community/webed/wiki/CSS/Properties/height

For the most part, people animating on the web can use transforms and opacity to reduce layout repaint triggers. Animating height is one of the most common use-cases that I've encountered where a transform (even scale) doesn't quite work without a lot of hacks that are fairly precariously balanced. (I can list the workarounds I've found if you would find it helpful).

Is there any possible way to improve the rendering of height or max-height? I believe it would be useful for developers to have a way to animate height without incurring a lot jank- for accordions, dropdowns, and the like. Any consideration here is appreciated.

@grorg
Copy link
Contributor

grorg commented Jan 9, 2017

The problem is that changing height requires a re-layout, and thus cause many things on the page to change their position.

I think your best bet is to hope that browsers (somehow) optimise this in the future. Or provide some way to isolate layout.

@grorg grorg closed this as completed Jan 9, 2017
@sdras
Copy link
Author

sdras commented Jan 9, 2017

Getting browsers to somehow optimize this is where I was hoping to head to- any suggestions on where to file issues to push that forward?

Thanks for any assistance.

@jakearchibald
Copy link
Contributor

@grorg I'm going to push for https://bugs.chromium.org/p/chromium/issues/detail?id=686074 to make this easier in Chrome. It doesn't solve the whole issue, but it goes a long way. Any interest in doing the same at WebKit?

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