Complexity Score
Low
Open Issues
0
Dependent Projects
67
Weekly Downloadsglobal
11,639
License
- MIT
- Yesattribution
- Permissivelinking
- Permissivedistribution
- Permissivemodification
- Nopatent grant
- Yesprivate use
- Permissivesublicensing
- Notrademark grant
Downloads
Readme
PostCSS Easings
PostCSS plugin to replace easing name from easings.net to cubic-bezier()
.
.snake {
transition: all 600ms ease-in-sine;
}
.camel {
transition: all 600ms easeInSine;
}
.snake {
transition: all 600ms cubic-bezier(0.47, 0, 0.745, 0.715);
}
.camel {
transition: all 600ms cubic-bezier(0.47, 0, 0.745, 0.715);
}
Usage
Step 1: Install plugin:
npm install --save-dev postcss postcss-easings
Step 2: Check your project for existed PostCSS config: postcss.config.js
in the project root, "postcss"
section in package.json
or postcss
in bundle config.
If you do not use PostCSS, add it according to official docs and set this plugin in settings.
Step 3: Add the plugin to plugins list:
module.exports = {
plugins: [
+ require('postcss-easings'),
require('autoprefixer')
]
}
Also, you can get all built-in easings:
require('postcss-easings').easings;
Options
easings
Allow to set custom easings:
require('postcss-easings')({
easings: { easeJump: 'cubic-bezier(.86,0,.69,1.57)' }
})
The plugin will convert custom easing name between camelCase and snake-case.
So the example below adds easeJump
and ease-jump
easings.
Custom easing names must start from ease
and contain only letters and -
.
You can create custom easing on cubic-bezier.com.
Dependencies
CVE IssuesActive
0
Scorecards Score
4.30
Test Coverage
No Data
Follows Semver
Yes
Github Stars
149
Dependenciestotal
1
DependenciesOutdated
0
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No
Learn how to distribute postcss-easings in your own private NPM registry
9 Releases
NPM on Cloudsmith