Skip to content

Latest commit

 

History

History
71 lines (59 loc) · 1.08 KB

File metadata and controls

71 lines (59 loc) · 1.08 KB

keyframe-declaration-no-important

Disallow !important within keyframe declarations.

@keyframes important2 {
  from { margin: 10px }
  to { margin: 20px !important }
}                /* ↑ */
/**                 ↑
*     This !important */

Using !important within keyframes declarations is completely ignored in some browsers:
MDN - !important in a keyframe

Options

true

The following patterns are considered violations:

@keyframes important1 {
  from {
    margin-top: 50px;
  }
  to {
    margin-top: 100px !important;
  }
}
@keyframes important1 {
  from {
    margin-top: 50px;
  }
  to {
    margin-top: 100px!important;
  }
}
@keyframes important1 {
  from {
    margin-top: 50px;
  }
  to {
    margin-top: 100px ! important;
  }
}

The following patterns are not considered violations:

a { color: pink !important; }
@keyframes important1 {
  from {
    margin-top: 50px;
  }
  to {
    margin-top: 100px;
  }
}