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:

Exploring The Aha Stack: Astro, Htmx, Alpine — A Complete Tutorial With A Demo Project And Comparison To Other Stacks

Exploring the AHA stack: Tutorial, demo, and comparison

The AHA stack — Astro, htmx, and Alpine — is a solid web development stack for smaller apps that emphasize frontend speed and SEO.

Oyinkansola Awosan
May 3, 2024 ⋅ 13 min read
Comparing Hattip Vs Express Js For Modern Application Development

Comparing Hattip vs. Express.js for modern app development

Explore what Hattip is, how it works, its benefits and key features, and the differences between Hattip and Express.js.

Antonello Zanini
May 2, 2024 ⋅ 8 min read
Using React Shepherd To Build A Site Tour

Using React Shepherd to build a site tour

React Shepherd stands out as a site tour library due to its elegant UI and out-of-the-box, easy-to-use React Context implementation.

Onuorah Bonaventure
May 1, 2024 ⋅ 14 min read
A Guide To Cookies In Next Js

A guide to cookies in Next.js

Cookies are crucial to web development. This article will explore how to handle cookies in your Next.js applications.

Georgey V B
Apr 30, 2024 ⋅ 10 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