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

> Can't simply the computed pixel value be used in the animation engine?

This, exactly.

Right now, the workaround we all have to do, is to use JS to measure the height that the element should have, then set that value explicitly using `el.style.height`.

Why can't the browser engine do the same that we do, to make this work? If JS can do it, the browser engine can definitely do it.

I can see why `calc(auto)` might be difficult, because `calc()` can do arbitrary expressions, and additionally `auto` might change during the animation. But that's not what we need. We just need `auto`. The standard, default case is not working right now.

I understand it might be difficult to solve every little edge case. But we're talking about the 99% common case here. The most obvious common case does not work, making CSS animations pretty useless in half of the cases. Instead of trying to solve all egde cases, and then do nothing, why not solve the common case first, and leave the edge cases for later, rather than leaving us all in the cold?

Why force all of us to do the size calculation manually in JS? If we can do it in JS, the browser engine can definitely do the same in the engine. In this case, it is warranted, because this is such an important case - the default case.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 16 May 2021 14:41:34 UTC