Files
DeviceManager/node_modules/stylelint/lib/rules/keyframe-declaration-no-important
..
2023-11-18 14:38:06 +01:00
2023-11-18 14:38:06 +01:00

keyframe-declaration-no-important

Disallow invalid !important within keyframe declarations.

@keyframes foo {
  from { opacity: 0 }
  to { opacity: 1 !important }
}              /* ↑ */
/**               ↑
*   This !important */

Using !important within keyframes declarations is completely ignored in some browsers.

Options

true

The following pattern is considered a problem:

@keyframes foo {
  from {
    opacity: 0;
  }
  to {
    opacity: 1 !important;
  }
}

The following patterns are not considered problems:

@keyframes foo {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
a { color: pink !important; }