5

I am using CSSLint for the first time and trying it now. When I write following CSS

.div {
    box-sizing: border-box;
    border: 1px solid red;
    padding: 5px;
    width: 100px;
}

Then when I run Warning - The box-sizing property isn't supported in IE6 and IE7.

I also changed "box-sizing": false to "box-sizing": true in my .csslintrc file.

But I am still getting this warning. How can I solve this problem?

Om3ga
  • 30,465
  • 43
  • 141
  • 221
  • 1
    The warning means just what it says. If you want this to be compatible with IE6/7 you can't use `box-sizing` at all. – Biffen Mar 28 '14 at 09:13
  • 1
    I know what it is, but how can I remove this warning? – Om3ga Mar 28 '14 at 09:43
  • Using `--ignore`, perhaps? – Biffen Mar 28 '14 at 09:46
  • I was expecting making changes somewhere in config file in reply. – Om3ga Mar 28 '14 at 09:54
  • got a better explanation over here http://stackoverflow.com/a/10978314/3222041 see if this helps – newTag Mar 28 '14 at 10:08
  • Why didn't anyone answer this? Why do people insist on giving advise instead of answer the question. WHO CARES about IE6 and IE7? Anyone who would, should probably update their wall calendar... – iGanja Feb 25 '15 at 01:52

2 Answers2

7

I believe the correct flag is --ignore=box-sizing, so

csslint --ignore=box-sizing css/

Not sure how to set that in the .csslintrc, but if you are using the SublimeLinter-csshint package you can set the flag in the SublimeLinter package settings.

You can also add the option to the CSS file itself since csslint v0.9.10 like this (don't add any spaces):

/*csslint box-sizing: false*/
Flimm
  • 136,138
  • 45
  • 251
  • 267
JHannes
  • 1,456
  • 2
  • 10
  • 12
-1

You can turn off the box model warning like so from the command line:

csslint --ignore=box-model test.css

Or inside a .csslintrc file by adding the following:

--ignore=box-model

Documentation

Evan Emolo
  • 1,660
  • 4
  • 28
  • 44