Re: [csswg-drafts] [css-transitions] Allow transitions to work at used value time (#10204)

There are many issues with doing this in general, which probably sink the idea.

For example, animating between two sizing keywords. This isn't possible with `calc-size()` because the layout algorithms sometimes condition their behavior on the exact sizing keyword used, so a "mixture" of two keywords wouldn't have a well-defined definition. The same applies to transitions *in general* - the two endpoints act like the specified keywords, so the midpoints need to somehow act like *both* of them too. And if you try to just calculate the px value that the keywords resolve to at layout-time and use that to transition, you get a *third* behavior for the midpoints that might be distinct from either of the endpoints! (For example, margin collapsing works differently if an element has a definite vs indefinite height.)

Outside of specific cases like that, all the layout engines are predicated on a certain degree of information flowing forward, not backward. Anchor Pos and CQ both do some funky stuff, and only in limited contexts, where we *can* define a strict ordering of value computation so that the layout-time information they depend on is guaranteed to already be available at the point where we're doing computed values on the element. (Sometimes this is explicitly a "we don't calculate the computed values on element X until later", sometimes it's "we'll just give element X some nonsense values, then recompute everything in a second pass"; the two approaches are identical in final behavior.) This is also the case *for the specs themselves* - there are several ways in which piping layout-time information into an arbitrary computed value would result in cyclic or undefined behavior.

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


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

Received on Monday, 15 April 2024 19:34:17 UTC