Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 1.04 KB

File metadata and controls

47 lines (36 loc) · 1.04 KB

no-duplicate-keyframes

Disallow duplicate @keyframes names.

@keyframes slide-in {}
@keyframes slide-in {}
/*          ↑
 * This duplicate name */

Defining the same @keyframes name more than once is almost always a mistake. The second definition silently overrides the first, making one of them dead code. CSS-wide keywords (initial, inherit, unset, revert, revert-layer) and reserved values (none, auto) are ignored since they are not valid <custom-ident> values.

Options

true

The following patterns are considered violations:

@keyframes slide-in {}
@keyframes slide-in {}
@keyframes foo {}
@keyframes foo {}
@keyframes foo {}

The following patterns are not considered violations:

@keyframes slide-in {}
@keyframes slide-out {}
/* CSS-wide keywords are not valid custom identifiers and are ignored. */
@keyframes none {}
@keyframes none {}