What Does Will-Change in CSS Do?
Key topics
The CSS property `will-change` has sparked a lively debate about whether it's a necessary optimization tool or a leaky abstraction that exposes implementation details. Some commenters, like vintagedave, worry that using `will-change` means "coding for the implementation, not the API," while others, like bgirard, who actually proposed `will-change` a decade ago, argue that it's a crucial hint for browsers to optimize performance in certain scenarios. The discussion reveals a deeper tension between staying up-to-date with the latest CSS features and avoiding unnecessary complexity, with some, like hollowturtle, throwing up their hands in frustration, while others, like CharlesW, counter that staying informed is key to understanding the problems that features like `will-change` aim to solve.
Snapshot generated from the HN discussion
Discussion Activity
Active discussionFirst comment
50m
Peak period
12
60-66h
Avg / period
4
Based on 16 loaded comments
Key moments
- 01Story posted
Aug 27, 2025 at 5:07 AM EDT
4 months ago
Step 01 - 02First comment
Aug 27, 2025 at 5:57 AM EDT
50m after posting
Step 02 - 03Peak activity
12 comments in 60-66h
Hottest window of the conversation
Step 03 - 04Latest activity
Aug 30, 2025 at 5:07 PM EDT
4 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
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?
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.
One of the meta-solutions you've missed is the establishment of "Baseline", which helps web devs understand what features and capabilities are safe to use. I hope this helps! https://web.dev/baseline
> Represents the formula max(minimum, min(limit, max-content)), where minimum represents an auto minimum (which is often, but not always, equal to a min-content minimum), and limit is the track sizing function passed as an argument to fit-content(). This is essentially calculated as the smaller of minmax(auto, max-content) and minmax(auto, limit).
Are you sure this is happening on the CPU? I thought the CPU-side only generates a list of paint commands but the GPU does the bulk of this job.
My knowledge is dated and second hand though. New GPU APIs hopefully changed this!