0

I am using CSS Lint to detect errors and warnings in a specific css. CSS Lint detects 3 errors:

enter image description here

in below piece of css code:

a.btn,
:not(li.menu_icon a.btn),
.k-button.btn,
input[type=submit].btn, 
input[type=button].btn, 
button[type=submit].btn:not(.gridAddBtn), 
button[type=button].btn:not(.gridAddBtn), 
a[name=butonWorkFlow].btn {
    background-image: none;
    min-width: 90px;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

...but I do not know how to correct it. I have basic knowledge about css.

6
  • You probably have an error before the snippet you posted. Commented Feb 10, 2021 at 11:48
  • @D.Pardal I have discarded this because I have only parsed the css code before this one and there are no errors. Line indicated by CSS Lint corresponds to :not(li.menu_icon a.btn) in that piece of code. Commented Feb 10, 2021 at 11:54
  • There are no errors on your posted CSS. The lint program is probably wrong. The only issue from the W3C CSS validation is unrecognised vendor extension for -moz- and -webkit- which you don't need for box-sizing, to be honest. Commented Feb 10, 2021 at 11:54
  • FYI: The W3C CSS Validator (jigsaw.w3.org/css-validator) marks :not(li.menu_icon a.btn) as a parse error here, when validating against profile CSS level 3 + SVG. Commented Feb 10, 2021 at 12:44
  • 2
    @CBroe: I don't recommend using Jigsaw to check CSS anymore, it's buggy, slow to catch up (or refuses to catch up with anything the maintainers don't consider a "standard" regardless of how stable or widely used the feature is), and it's been that way for years. Everyone uses stylelint these days. Commented Feb 11, 2021 at 3:51

2 Answers 2

4

CSS Lint is no longer being updated, so does not recognize the updated :not() syntax. Use an up-to-date linter, such as stylelint, which will pass your CSS.

Sign up to request clarification or add additional context in comments.

Comments

1

:not(selector) is part of CSS3. Might be you are using lower version.

1 Comment

CSS Lint recognizes the old :not() syntax just fine, it's the new syntax that it doesn't understand. The highest version of CSS Lint is several years old. Nobody uses it anymore.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.