
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
stylelint-high-performance-animation
Advanced tools
Stylelint rule for preventing the use of low performance animation and transition properties.
Stylelint rule for preventing the use of low performance animation and transition properties.
This is a fork of stylelint-performance-animation stylelint plugin. It uses a blacklist for harmful properties instead of a whitelist, which makes it easy to avoid false positives and allows you to specify which type of properties to warn for (layout
/paint
).
npm install stylelint-high-performance-animation --save-dev
or
yarn add stylelint-high-performance-animation --dev
Add this config to your .stylelintrc
or stylelint config inside package.json
:
{
"plugins": ["stylelint-high-performance-animation"],
"rules": {
"plugin/no-low-performance-animation-properties": true
}
}
div {
transition: margin 350ms ease-in;
}
/** ^^^^^^
* You should not use low performance animation properties */
@keyframes myAnimation {
50% {
top: 5px;
}
}
/** ^^^^^^
* You should not use low performance animation properties */
For more information read article By Paul Lewis and Paul Irish
true
The following pattern is considered warning:
div {
transition: margin-left 350ms ease-in;
}
The following pattern is not considered warning:
div {
transition: transform 350ms ease-in;
}
ignore: "paint-properties"
Makes the rule not warn for properties that cause paint
and only warn for properties that cause layout
.
ignoreProperties: [string]
Given:
{ ignoreProperties: ['color', 'background-color'] }
The following pattern is considered warning:
div {
transition-property: color, margin;
}
The following pattern is not considered warning:
div {
transition-property: color, opacity, background-color;
}
This plugin has only stylelint as a dependency.
MIT
v1.11.0
transition
with transition-property
(#233).FAQs
Stylelint rule for preventing the use of low performance animation and transition properties.
The npm package stylelint-high-performance-animation receives a total of 18,472 weekly downloads. As such, stylelint-high-performance-animation popularity was classified as popular.
We found that stylelint-high-performance-animation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.