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

If CSS transition can only currently only transition from the concrete values that the CSS author specifically wrote (e.g. `14px` or `calc(10px + 3em)` = 83px), and cannot transition from values computed from the layout flow (`height: auto` considering content = 430px), then yes:

It appears that this is exactly what this bug is about. You explain well why we have the bug. Thank you. Given that this is the root of the bug, this fundamental limitation has to be lifted, if we want to fix this bug here properly.

It seems to me from what you say that the biggest implementation problem is the trigger. This may require some new internal API in the CSS engine to allow for the trigger. After layout, the engine needs to notice that the concrete value for `auto` changed, and trigger something. Once triggered (and if there is an `auto`-transition on the element), use the saved previous value, the new value, and current time, and start the transition between those.

I think this most closely matches the mental model that CSS authors have and expect when they transition an `auto` value. This definition is also much more easy to understand than the other alternatives suggested here. But maybe I'm missing something why this impossible.

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


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

Received on Friday, 12 April 2024 22:28:39 UTC