CSSLint / csslint

Automated linting of Cascading Stylesheets
http://csslint.net
Other
4.76k stars 483 forks source link

compatible-vendor-prefixes fails for keyframes transform #687

Open rbecheras opened 7 years ago

rbecheras commented 7 years ago

This issue was initially reported to grunt-contrib-csslint but its a csslint issue.

see there: https://github.com/gruntjs/grunt-contrib-csslint/issues/61

Given a CSS file containing this content:

@keyframes spin {
  from {
    -moz-transform: rotate(10deg);
    -ms-transform: rotate(10deg);
    -webkit-transform: rotate(10deg);
    transform: rotate(10deg);
  }
  to {
    -moz-transform: rotate(360deg);
    -ms-transform: rotate(360deg);
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

Here is the behavior of csslint without any custom global options:

$ csslint transform.css

csslint: There is 1 problem in /dev/test-csslint/transform.css.

transform.css
1: error at line undefined, col undefined
Fatal error, cannot continue: Cannot read property 'push' of undefined
undefined
rbecheras commented 7 years ago

To be complete, let say that with the folowing option:

--ignore=compatible-vendor-prefixes

The lint doesn't fail:

$ csslint transform.css 

csslint: No errors in /dev/test-csslint/transform.css