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

@danegraphics As I have said multiple times, transitions work on computed values, switching to used values is an entirely different model that needs to be properly designed. But so far the only solid proposal that I have seen is `calc-size()`.

> If `height: auto;` on a div results in the equivalent of `height: 507px`, then use that value (507px) for the transition with `auto`.

This fails to consider that even if `height: auto` makes the element be 507px tall, the behavior can be different than with `height: 507px`. In particular, if a child has a percentage, it will be cyclic for `auto`, but not for `507px`, see https://software.hixie.ch/utilities/js/live-dom-viewer/saved/12246. So how should this child behave during the transition?

With the proposed `calc-size()`,  you would transition between `calc-size(auto, size)` and `calc-size(auto, 0px)`, and the child percentage would always be cyclic, so at least the behavior is smooth.




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


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

Received on Wednesday, 27 December 2023 21:12:43 UTC