keyframe-declaration-no-important
CSS / SCSS / LessCSS / SCSS / LessCSS / SCSS / Lesscorrectnessno fixdefault: warncss/stylelint-recommended
What it does
Section titled “What it does”Reports !important in a declaration of a @keyframes rule.
Why it matters
Section titled “Why it matters”A declaration with !important in a keyframe is ignored, so the property does not animate, and no error tells you.
To fix, delete the !important.
Example
Section titled “Example”...@keyframes k { from { color: red } to { color: blue !important }}Configuration
Section titled “Configuration”css: lint: rules: keyframe-declaration-no-important: warn # off, warn (default), errorless: lint: rules: keyframe-declaration-no-important: warn # off, warn (default), errorscss: lint: rules: keyframe-declaration-no-important: warn # off, warn (default), errorEnabled by the presets: css/stylelint-recommended.
Suppress one line with sudsy-disable-next-line keyframe-declaration-no-important in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| stylelint | keyframe-declaration-no-important |
full |