Re: [csswg-drafts] [css-display] Why is display listed as not animatable instead of animation type: discrete? (#6429)

> There is no distinction between computed and animated values, is there? Aren't they one and the same? I asked for this distinction a decade ago in public-fx, because the pattern I call relative animation doesn't need current animated values for interruption. It only ever needs discrete values. Also, the underlying value is not necessarily discrete, which also confused me ten years ago.
> 
> Is or is not the comment I made almost eight hours before flackr the same solution?
> 
> This is what I wrote: [#6429 (comment)](https://github.com/w3c/csswg-drafts/issues/6429#issuecomment-1486246609)
> 
> > Instead of removing animations when set to none, remove animations when the computed value resolves to none.
> 
> This is what flackr wrote less than eight hours later: [#6429 (comment)](https://github.com/w3c/csswg-drafts/issues/6429#issuecomment-1486895943)
> 
> > This got me wondering whether we could only remove animations if the base computed display style AND the computed display style is none.


> 
> And then yesterday: [#6429 (comment)](https://github.com/w3c/csswg-drafts/issues/6429#issuecomment-1503849651)
> 
> > only when the base computed style _and_ the animated display style both produce `none`
> 
> Can someone please explain the difference? If not, please make the distinction between discrete and animated computed values in specification. Is there a new definition in css-cascade-4, css-cascade-5, or css-cascade-6? They're hard to read since they are in some .bs format (no pun intended).

The **base** word is the key difference here. This is referring to the style before the animations and transitions cascade. The computed value will resolve to `none` if we allow the animation to include `display: none` in its keyframes which then leads to the problematic circularity.

However, if the value before the animations part of the cascade is also `none` then when the computed value becomes `none` canceling the animation will not restart the animation.

I've taken a pass at writing the spec updates for this in https://github.com/w3c/csswg-drafts/pull/8713

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


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

Received on Thursday, 13 April 2023 21:21:18 UTC