nth-child error?
My CSS validator is set to level 3, but whenever I use nth child I still see a error.
For example:
td:nth-child(3) {
color: blue;
}
The error is:
W3C: Encountered "3" at line 314, column 14.
Was expecting one of:
<S> ...
<IDENT> ...
<HASH> ...
"[" ...
"*" ...
"." ...
":" ...
"::" ...
<CLASS> ... less...(Ctrl+F1)
What gives?
Please sign in to leave a comment.
Hi Bryan,
1) What type of file is that -- .css or CSS block inside HTML/PHP file ?
2) What version of PhpStorm do you use exactly ?
3) Does *.css is assigned to "Cascading style sheets" in File | Settings | File Types ?
4) Maybe you have overwritten the tempalte data language somehow in File | Settings | Template Data Languages ?
I have put your code example into .css file, CSS Level 3 ... and see no errors on PhpStorm 2.1 RC (PS-107.120) running on Windows 7 x64.
Please try your code fragment on brand new project.
1) What type of file is that -- .css or CSS block inside HTML/PHP file ?
* It is a .css file.
2) What version of PhpStorm do you use exactly ?
* phpStorm 2.0.1
3) Does *.css is assigned to "Cascading style sheets" in File | Settings | File Types ?
* yes
4) Maybe you have overwritten the tempalte data language somehow in File | Settings | Template Data Languages ?
* nope
5) Please try your code fragment on brand new project.
* same issue in 3 projects
Note I believe that I may of mislead you with my subject of this post. This is a "warning" note a "error".
Maybe this is corrected in your version of phpStorm?
Hi Bryan,
I'm using 2.1 RC build, PS-107.120 (you can get it here) and I see no warnings at all (whole file shows "green" marker). The below is the only thing that I have in CSS file -- all green.
Try the latest build and see if it makes any difference.
Yes you are correct with version 2.1 I get the whole file "green" indicator. If I launch the same file with 2.0 I get the warnings.
I am still not getting "type ahead" for the nth-child selector on 2.1 but thats out of the scope of this report.
Thanks you. Accepting this as an answer to the question.
Hi Bryan,
Please watch & vote this ticket: http://youtrack.jetbrains.net/issue/WI-5633?projectKey=WI
Strange, but in version 2.1.2 these selectors are once again being marked with a yellow warning.
Anyone having a similar issue?
Hello, Bryan
Unfortunatelly, we had to return old version of validation library provided by W3C in PhpStorm 2.1.2, because a new one (which was bundled into PhpStorm 2.1.1) had some performance problems, which we weren't able to get round. We've managed to fix this in 3.0 version of PhpStorm. As workaround, you can disable W3C Css Validator Inspection.