Search code examples
csscsslint

CSSLint: Ignore single line in CSS file?


I'm working with a CSS file that uses Mozilla's -moz-element(#element) directive for a background-image. The code looks like:

#foo {background-image: -moz-element(#element);}

When I run this through CSSLint, it tells me that the "Rule is empty", despite the fact that it's obviously not. I could attempt to run CSSLint via command line and use --ignore, but what I'm really looking for is a way to ignore just that single line from within my CSS file. Is there a way to do that?

And just for clarity, what I'm looking for is the analogue to how JSHint does things, which looks like this:

var notChecked = 'This line won't get checked'; // jshint ignore:line


Solution

  • CSSLint does not currently support a single-line ignore function from within a CSS file. Hopefully (would be awesome!) this changes in the future.