What Does will-change In CSS Do?
jakub.kr
What Does will-change In CSS Do?
1–10 of 17 posts
Re: What Does will-change In CSS Do?
#2While 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?
Re: What Does will-change In CSS Do?
#3Re: What Does will-change In CSS Do?
#4Re: What Does will-change In CSS Do?
#5Are 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.
Re: What Does will-change In CSS Do?
#6I given up learning any new css, keeping up to date with "solutions" that would create more problems, more code, more confusion and difficult to maintain. I feel like it's becoming this humungous monster we don't want to talk about or admit it's there, for me personally it still has all the problems we complain about since who knows when anymore
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
Re: What Does will-change In CSS Do?
#7> Now the boxes get filled with pixels, colors, borders, shadows and images. Think of someone coloring in the board game pieces. This also uses the CPU and some extra memory to store the painted bits. 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!
Re: What Does will-change In CSS Do?
#8There'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?
Re: What Does will-change In CSS Do?
#9There'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?
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.
Re: What Does will-change In CSS Do?
#10> Now the boxes get filled with pixels, colors, borders, shadows and images. Think of someone coloring in the board game pieces. This also uses the CPU and some extra memory to store the painted bits. 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.
For a good long while at least, this flag was a signal for the browser to use CPU rendering, because of the overhead of GPU setup for rendering very changing content was too high. My knowledge is dated and second hand though. New GPU APIs hopefully changed this!