Skip to content

PostCSS plugin to add will-change property after transition declarations

Notifications You must be signed in to change notification settings

megatolya/postcss-will-change-transition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PostCSS will change transition

PostCSS plugin to generate will-change for transition props.

This plugin adds will-change property after transition property to speed up animations.

Can be combined with postcss-will-change plugin.

.foo {
    transition: opacity 0.2s ease, width 0.2s ease;
}
.foo {
    transition: opacity 0.2s ease, width 0.2s ease;
    will-change: opacity, width;
}

Important note

Make sure that if you use this plugin it does not contradict with will-change idea. Please see links below:

Usage

postcss([ require('postcss-will-change-transition') ])

// with fallback plugin:
postcss([ require('postcss-will-change-transition'), require('postcss-will-change')  ])

See PostCSS docs for examples for your environment.

About

PostCSS plugin to add will-change property after transition declarations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published