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:

Building a Full-Featured Laravel Admin Dashboard with Filament

Building a full-featured Laravel admin dashboard with Filament

Build scalable admin dashboards with Filament and Laravel using Form Builder, Notifications, and Actions for clean, interactive panels.

Kayode Adeniyi
Dec 20, 2024 ⋅ 5 min read
Working With URLs In JavaScript

Working with URLs in JavaScript

Break down the parts of a URL and explore APIs for working with them in JavaScript, parsing them, building query strings, checking their validity, etc.

Joe Attardi
Dec 19, 2024 ⋅ 6 min read
Lazy Loading Vs. Eager Loading

Lazy loading vs. Eager loading

In this guide, explore lazy loading and error loading as two techniques for fetching data in React apps.

Njong Emy
Dec 18, 2024 ⋅ 5 min read
Deno logo over an orange background

How to migrate your Node.js app to Deno 2.0

Deno is a popular JavaScript runtime, and it recently launched version 2.0 with several new features, bug fixes, and improvements […]

Yashodhan Joshi
Dec 17, 2024 ⋅ 7 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