keyframe-selector-notation
What it does
Section titled “What it does”Reports from and to in a @keyframes that also uses percentages. A block with nothing but keywords is not reported.
Why it matters
Section titled “Why it matters”from is 0% and to is 100%, so mixing the forms in one animation makes the reader translate. With percentages the animation reads as a timeline.
To fix, write 0% and 100%.
Example
Section titled “Example”...@keyframes k { from { top: 0 } to { top: 1px } }@keyframes j { from { top: 0 } 50% { top: 1px } to { top: 2px } }...@keyframes k { from { top: 0 } to { top: 1px } }@keyframes j { from { top: 0 } 50% { top: 1px } to { top: 2px } }Configuration
Section titled “Configuration”css: lint: rules: keyframe-selector-notation: warn # off (default), warn, errorless: lint: rules: keyframe-selector-notation: warn # off (default), warn, errorscss: lint: rules: keyframe-selector-notation: warn # off (default), warn, errorEnabled by the presets: css/stylelint-standard.
Suppress one line with sudsy-disable-next-line keyframe-selector-notation 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-selector-notation |
full |