Questions tagged [csslint]

csslint is a program used to parse CSS and flag syntax errors, anti-patterns, and redundant declarations.

csslint is open-source and has command-line, browser, and IDE interfaces.

79 questions
4
votes
2 answers

Repeated Heading Selectors

With the recent launch of http://csslint.net, I'm questioning some ways I've constructed my stylesheets in the past. The following method is one that I've used recently: /* Fonts */ h1 { font-size:20px } p { font-size:12px } /* Colors */ h1 {…
Sampson
  • 265,109
  • 74
  • 539
  • 565
4
votes
3 answers

How do I stop csslint and jshint from linting my EJS in Atom?

I'm editing EJS files in Atom. I currently have linter-csslint and linter-jshint packages installed. Both seem to be recognising the .ejs files as .html and linting it as HTML. This is what I see How do I get the linters to ignore .ejs files? Or is…
Ben Morgan
  • 45
  • 1
  • 1
  • 7
4
votes
1 answer

Visual Studio CssLint Css Grid validation fails

I am using the new Css Grid layout, but it seems that the CssLint version used by Visual Studio 2017 does not support that. I get the validation error seen in the screenshot: Does anyone know how to get it updated, or need i just wait for it?
Axel Andersen
  • 330
  • 4
  • 14
4
votes
0 answers

How to exclude node_modules from buildin VS Code CSS linter

VS Code reports CSS linter warning from files in node_modules. How can I disable checks in node_modules? This is my jsconfig.json file (if it matters): { "compilerOptions": { "target": "ES6", "module": "commonjs" }, "exclude": [ …
Robert Zaremba
  • 8,081
  • 7
  • 47
  • 78
4
votes
2 answers

Ignore star hack completely in CSSLint?

I have CSS like this to target Internet Explorer 6 specifically. .inline-block { display: -moz-inline-stack; display: inline-block; *display: inline; zoom: 1; width: 100px; } When I run CSSLint via csslint…
Ryan
  • 10,041
  • 27
  • 91
  • 156
4
votes
1 answer

Does CSS3 box-sizing using the universal selector (*) slow the browser?

I prefer the CSS border-box model, and I guess a lot of other people do too: *, *:before, *:after { box-sizing: border-box; } However CSS Lint warns me: The universal selector (*) is known to be slow. Is that really the case here? Using the…
Leo
  • 4,136
  • 6
  • 48
  • 72
3
votes
0 answers

gulp-scss-lint configuration file not validating scss file and showing warning

I have installed node, gulp on my local system and try to use css lint using gulp. Below is my code. common.scss file dd { margin: 0; } gulp/config.js scss: { source: '/web/assets/scss/**/*.scss', destination: '/web/assets/css', …
Prashant Patil
  • 2,463
  • 1
  • 15
  • 33
3
votes
1 answer

browser error while declaring CSS3 variables, Expected RBRACE, This rule looks for recoverable syntax error

I am trying to use variables in my CSS3 file, I have used following code :root{ --nvc-theme: green; --nvc-themelite: grey; } this is the css I am using to declare two variables in my project but when I compile CSS with csslint it is showing error…
Aravind Reddy
  • 747
  • 6
  • 20
3
votes
0 answers

Jenkins Warnings Plugin - Content is not allowed in prolog error

Today, I setup Warnings Plugin, and use CssLint and JSLint but after build I get error message to the all file: java.io.IOException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. This is my…
ZeroProcess
  • 1,140
  • 2
  • 10
  • 21
3
votes
2 answers

How to use .csslintrc in Atom's CSSLint to ignore rules?

I'm using Linter with Linter-CSSlint in Atom (windows) and I want to prevent some warnings globally (like "ids"). In CSSlint's readme says that it supports .csslintrc but I can't find info of where should I put this .csslintrc file. I saw a…
distante
  • 6,438
  • 6
  • 48
  • 90
3
votes
1 answer

Does removing overqualified elements really improve performance?

I used some tools to validate my css for improving performance and i got feedback asking me to remove overqualified elements. It does makes sense as it can improve selector performance, but was surprised to see this one as…
3
votes
0 answers

Spurious error on