W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2021

Re: [csswg-drafts] [css-transitions] Transition to height (or width) "auto" (#626)

From: jstsch via GitHub <sysbot+gh@w3.org>
Date: Thu, 06 May 2021 10:51:10 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-833428979-1620298269-sysbot+gh@w3.org>
Almost 15 years ago, we were solving this with [jQuery.slideUp() / jQuery.slideDown()](https://api.jquery.com/slideup/). It's a bit sad that this solution seems to still be the state of the art :smile:

As a web dev, the expected result is that simply having `height: 0` → `height: auto` be animatable using a CSS transition, and working the exact same way as if the CSS was `height: 0` → `height: 400px`, if the calculated height of the element was 400px. The browser would only have to calculate this pixel value once, at start of transition?

Currently, I'm seeing awful `max-height` hacks which have inconsistent animation timing or worse, chopped off content due to a too low value for `max-height`.

GitHub Notification of comment by jstsch
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/626#issuecomment-833428979 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 6 May 2021 10:51:12 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:33 UTC