From b5bef9435416cc37501606459848e2b1e9867227 Mon Sep 17 00:00:00 2001 From: Jeffrey Camphens Date: Thu, 29 Nov 2018 01:50:13 +0100 Subject: [PATCH] Added warning about will-change (#23646) * Added warning about will-change Sounds like an easy performance improver right? It won't hurt mentioning that this should be used with some leven of caution. * Added 'Tip' to change --- guide/english/css/will-change/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guide/english/css/will-change/index.md b/guide/english/css/will-change/index.md index f33bddfd90..afe6e5761c 100644 --- a/guide/english/css/will-change/index.md +++ b/guide/english/css/will-change/index.md @@ -25,6 +25,8 @@ If you used ```will-change: display```, then a new overlay context will not be c Let's look at another example: ```opacity```. Opacity with a value of 1 does not create a new overlay context, but with a lower value (for example, 0.9) will create. While will-change: opacity will in any case create a new overlay context. +Tip: Be careful when you use this property. You should only be using it when you are 100% sure the element will change, as overusing this property will use a lot of resources. In some cases it can be really useful to only apply will-change when the user hovers the parent of the element. + #### More Information: - [will-change on MDN web docs](https://developer.mozilla.org/en-US/docs/Web/CSS/will-change) - [CSS Will Change Module Level 1 (working draft)](https://drafts.csswg.org/css-will-change/#will-change)