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

Web animations have no owning element, but still have an [effect target](https://drafts.csswg.org/web-animations-1/#keyframe-effect-effect-target) to which their animated styles apply. Animations with owning elements continue running as long as their owning element is in the document and displayed, for example if you click Toggle A in [this demo](https://jsbin.com/dizosa/edit?html,css,js,output) the css animation continues to run even though A has display none because its owning element, B, is still in the document. Animations without an owning element continue to run forever.

As such, the only case we need to prevent is an animation setting style such that it stops its own animation - i.e. applies `display: none` to its owning element (or an ancestor). What I've proposed is a slight simplification, since I suspect developers changing the effect target of css animations is uncommon but if we wanted to be precise we could say only if the effectTarget is the owning element or an ancestor of it.

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


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

Received on Tuesday, 21 March 2023 14:10:31 UTC