How to use validationsummary css

CSS `will-change` - how to use it, how it works

I spent some time looking at how property works and how we can use it. Hope it will be useful in summary. Thanks everyone for the answers.

1. Layers hack / zero transform hack

In 'old days' (like 2 years ago) someone discovered you can draw your CSS animation faster.

How does it work?

If you add to a css selector that will force it in a browser to move the element with that selector to the new compositor layer. What's more, it gets performance (in most situations, use the powers of the GPU instead of CPU) Read More

2. Bye Bye hacks, welcome "-change:"

It's probably too early to say bye bye to Shift Hack, but that time will come soon.
The new property appeared in the specs of CSS and will be a great successor to the hack layer.

3. Browser support

For now, it's available in Chrome and Opera, and partially supported by Firefox, as well.

4. How to use it properly

Don't use it - change anywhere in your CSS until after you do
the full implementation of the animations. Only then should you go back
CSS and apply change. More

This is probably the most valuable piece of advice anyone can get.

There is no point to it just before an action begins, e.g. by adding the state of a selector. Because browsers do not have the necessary time to prepare for the optimization before the change occurs. Browsers need about 200ms to apply optimization, so for example it is better to add on an element when a parent element is on hover state. More

Example:

Do you need to use it really sparingly. If you want to optimize everything, the results will be opposite than expected. Forces browser to keep optimization turned on and reserve resources like memory for future changes that might never happen. It is recommended to switch on afterwards when it is no longer necessary, e.g. when the animation is finished.

You can do it easily with JavaScript

Shareimprove this answer by LJ Wadowski