2023-02-15
1688
#css
Timonwa Akintokun
159444
107
Feb 15, 2023 ⋅ 6 min read

When and how to use CSS will-change

Timonwa Akintokun Frontend developer and technical writer who is passionate about the web. Creator of websites that tell stories.

Recent posts:

Rust logo over black marble background.

Handling memory leaks in Rust

Learn how to manage memory leaks in Rust, avoid unsafe behavior, and use tools like weak references to ensure efficient programs.

Ukeje Goodness
Nov 20, 2024 ⋅ 4 min read
Robot pretending to be a person.

Using curl-impersonate in Node.js to avoid blocks

Bypass anti-bot measures in Node.js with curl-impersonate. Learn how it mimics browsers to overcome bot detection for web scraping.

Antonello Zanini
Nov 20, 2024 ⋅ 13 min read
Solving Eventual Consistency In Frontend

Solving eventual consistency in frontend

Handle frontend data discrepancies with eventual consistency using WebSockets, Docker Compose, and practical code examples.

Kayode Adeniyi
Nov 19, 2024 ⋅ 6 min read
How To Use Lazy Initialization Pattern With Rust 1.80

How to use the lazy initialization pattern with Rust 1.80

Efficient initializing is crucial to smooth-running websites. One way to optimize that process is through lazy initialization in Rust 1.80.

Yashodhan Joshi
Nov 18, 2024 ⋅ 5 min read
View all posts

4 Replies to "When and how to use CSS <code>will-change</code>"

  1. I didn’t like this article. It is very vague and does not explain how will-change works. It does not even mention that the mdn documentation advise to avoid using it if not necessary.

    Warning: will-change is intended to be used as a last resort, in order to try to deal with existing performance problems. It should not be used to anticipate performance problems.

    Repeating that it will make animations run more smoothly or improve performance does not explain how it works on when it should be used.

    In my opinion it is better to just read the mdn documentation page as it reads better and has more information. A novice after reading this article may think that it is fine to apply will-change on any element that will change.

    1. Thank you for your feedback. I’m sorry if the article wasn’t as clear as you would have liked. I did mention in the introduction and conclusion that will-change should be used with caution as it can do more harm than good if used incorrectly. I agree that the MDN documentation is a valuable resource, and I encourage anyone who wants to learn more about will-change to read it. Thank you again for your comment.

    1. Thanks for your comment. I’m glad to see we both agree that will-change should only be used as a last resort, which I mentioned in the introduction and conclusion of my article. It’s important to use this CSS property with caution and only when necessary. If you have any other feedback, I’d be happy to hear it. Thanks again.

Leave a Reply