Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beautification of "nth-child" css fails csslint #418

Closed
rennyeb opened this issue Feb 28, 2014 · 0 comments
Closed

beautification of "nth-child" css fails csslint #418

rennyeb opened this issue Feb 28, 2014 · 0 comments

Comments

@rennyeb
Copy link

rennyeb commented Feb 28, 2014

If I use js-beautify or css-beautify 1.4.2 to beautify the following css:

.half_circle_style a:nth-child(2) {}

... the result contains a space before "nth-child":
.half_circle_style a: nth-child(2) {}

...which produces the following errors in csslint (grunt-contrib-csslint v0.2.0)

[L1:C23]
>> Expected LBRACE at line 1, col 23. This rule looks for recoverable syntax errors. (errors)
[L1:C23]
>> Unexpected token 'nth-child(' at line 1, col 23. This rule looks for recoverable syntax errors. (errors)
[L1:C33]

Unexpected token '2' at line 1, col 33. This rule looks for recoverable syntax errors. (errors)
[L1:C34]
>> Unexpected token ')' at line 1, col 34. This rule looks for recoverable syntax errors. (errors)
[L1:C36]
>> Unexpected token '{' at line 1, col 36. This rule looks for recoverable syntax errors. (errors)
[L1:C37]
>> Unexpected token '}' at line 1, col 37. This rule looks for recoverable syntax errors. (errors)

From what I can gather (http://stackoverflow.com/questions/22074564/css-linter-vs-beautifier-inconsistency) this is a bug in js-beautify/css-beautify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants