CSS Transitions:

Usage and Performance

🧵A thread 🧵
Usage:

Only two properties are required for a CSS transition.

1. transition-property
2. transition-duration

The other two properties are optional ( transition-delay and transition timing function )
There are two ways to use transitions.

A. You could break everything.
B. Shorthand.
Timing Functions:

Timing functions like cubic-bezier add life to the transition by giving it a unique motion.
Here are some resources to get you familiar with timing functions:

1. https://cubic-bezier.com/#.17,.67,.83,.67
2. https://matthewlein.com/tools/ceaser 
3. https://easings.net/ 
will-change:

This CSS property notifies the browser that something is going to change. You better get ready and do the optimizations.
A resource on CSS will-change property:

https://dev.opera.com/articles/css-will-change-property/
Performance:

You will want to stick to transitioning transform and opacity as much as possible.

Transitioning layout properties can cause layout and paint issues.

Check more at http://csstriggers.com 
Next a deeper dive into timing functions!
You can follow @thearslankhalid.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: