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

Storing (and not updating) the amount of pixels looks more like interpolating used values. Imagine you interpolate from `height: auto` (which resolves to 0px) to `height: 200px`. At 50% with linear easing, the height should be `(0px + 200px) / 2 = 100px`. But then if you add some contents that would make `auto` resolve to 50px, then the height should immediately become `(50px + 200px) / 2 = 125px`, if the approach is based on computed values. That would be consistent with what happens when interpolating a percentage and changing the size of the containing block.

Basically, for interpolating between a computed `auto` and a `<length-percentage>`, we need to define how to treat a math expression like `t * auto + (1 - t) * <length-percentage>`. And at that point I'd just add full support for `auto` in `calc()`, e.g. things like `calc(2 * auto)`, `calc(auto + 100px)`, etc. With the expectancy that `calc(auto + 0px)` should be equivalent to `auto`, and `calc(0*auto)` should be equivalent to `0px`. The difficult part is that various things (like [`stretch`](https://www.w3.org/TR/css-align-3/#valdef-justify-self-stretch)) depend on whether the computed value is `auto`, what to do if it's a mix?

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


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

Received on Monday, 28 February 2022 11:48:17 UTC