- From: Robert Flack via GitHub <sysbot+gh@w3.org>
- Date: Thu, 09 Mar 2023 17:29:26 +0000
- To: public-css-archive@w3.org
> * What about introducing a new value that's similar to none, except the boxes are skipped during layout/painting/a11y, but not actually destroyed? Then in animations you could have 'display: none' (and 'content: none' on pseudos) behave as that value. I think this is effectively `content-visibility: hidden`, which developers should also be able to do as part of this change (i.e. we should also make content-visibility animatable as discrete interpolation. > * Alternatively, since the main use case seems to be animating to/from 'display: none', introducing a new property (or a new value of 'visibility'?) that flips between 'display me' and 'don't display me' and having _that_ be animatable as discrete. (There's been requests for such a property in the past, to avoid messing with the "which box type" aspect of 'display'.) If we have interpolation from any value and `none` always choose the non-none value (similar to visibility animations) we will have effectively this. > Rebuilding layout trees is not fast, I'm surprised you want to enable it during an animation. The flip of the value happens once (per keyframe pair that changes the value), this is simply enabling developers to coordinate these property changes with the rest of their animation without having to do the same style change / layout tree rebuild they would have done in a JS listener. It does seem worth avoiding potential cycles in determining what the state should be - I just thought it was interesting that we already had allowed what is essentially a cycle with content animations. Interestingly on my demo every browser handles it differently: * Chrome applies the `content: none` and never updates again (e.g. the animation is effectively canceled but none is still applied. * Firefox continues the animation even after the box goes away. * Safari applies the `content: none` and which removes the pseudo for a frame but then restyles it as the animation override is no longer there restarting the animation. This is the cycle we are trying to avoid by having `none` compute to the underlying style. -- GitHub Notification of comment by flackr Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6429#issuecomment-1462468918 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 9 March 2023 17:29:28 UTC