Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Latest commit

 

History

History
25 lines (17 loc) · 479 Bytes

avoid-animation.md

File metadata and controls

25 lines (17 loc) · 479 Bytes

Avoid too many css animations

Rule Details

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.

Example of incorrect code for this rule:

.box {
    will-change: transform, opacity;
}

Alternative code for this rule:

@media (prefers-reduced-motion : no-preference ) {
.animation {
        animation: fadeIn 4s ease;
    }
}