- From: Noam Rosenthal via GitHub <noreply@w3.org>
- Date: Wed, 05 Nov 2025 16:26:52 +0000
- To: public-css-archive@w3.org
noamr has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-animations-2] Allow expressing width/height animations as scale animations == ## Problem statement Width/height animations are pretty common, and we've recently enhanced them with [`interpolate-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/interpolate-size). They are becoming more common as view transitions use them by default. However, width/height animations require a layout in every frame, which means they can't run on the compositor. This is causing performance issues to some of our partners, some having to resort to building scale animations by hand. ## Proposal Suggesting to allow some option that lets the browser converting a width/height animation into a scale animation. This would look different from the default width/height animation, as the contents are scaled proportionally rather than have their layout recomputed, but in many cases this is a good tradeoff. ## Issues One issue with this is that it's unclear which size is used for layout (while the other one is used to scale). Another issue is how this works in practice, and reflected in computed style. ## A possible way make it work A CSS property defining that size animates as scale, and which size to use for layout: `size-animation: normal | scale-old | scale-new` (or some such). When this property is other than `normal`, it affects the `width`, `height` and `scale` values used for interpolation, and thus their computed style during interpolation: - `width` and `height` are set to the same value on both sides, either the old or new one - `scale` is adjusted to the appropriate values on both sides. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13064 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 5 November 2025 16:26:53 UTC