vintagedave
4 days ago
There's a point at which you start coding for the implementation, not the API. That's always dangerous.
While I understand the point -- hinting to the implementation -- is it really something we need, in the sense that is CSS the right place for this, rather than handling these situations better in the browser implementation?
bgirard
a day ago
I proposed will-change a decade ago when I used to work on the rendering stack at Mozilla and also tuned frontends.
In some circumstances the heads up is totally required. For example if you're on a low spec mobile device with a relatively high resolution display, you're in a situation where you can't build a layer for an animation you didn't expect. And your memory footprint is so low so you don't want to be building layers unless you need them. If you don't have the heads up then you're going to drop the first few frames of the animation and the experience is going to be janky every time.
If you're in a situation where it's not required, then I would advice against using it FWIW. I still work on optimizing web frontends and I almost never use this property because I rarely need it.
culi
a day ago
I agree that it feels like a leaky abstraction but `will-change` has been around for well over a decade now and is restricted to the animation part of CSS and I can't think of any other feature of CSS that acts similarly
sorrythanks
19 hours ago
I'm not sure if will-change is coding for the implementation as much as it is engaging with material reality.