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
This commit is contained in:
Jeffrey Camphens
2018-11-29 01:50:13 +01:00
committed by Manish Giri
parent d11b18ff0b
commit b5bef94354

View File

@ -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)