Okay I tested cssparser_v2.1 against the following broken css
Code:
.kevin {
color: blue;
.new { color: Teal; background-color: #FFFF00; }
.deleted { color: red; background-color: #FFFF00; text-decoration: line-through; }
And it produced 2 errors:
Error: 5: Unexpected character '.'in property name
Error: 5: Unexpected character '{'in property name
and the following output:
Code:
.kevin {
color:blue;
newcolor:Teal;
background-color:#FFFF00;
}
So without a proper closing selector it kept trying to build the current selector list of properties and values and of course then detected the "{" as being an illegal part of a property name.
If the snippet:
Code:
.kevin {
color: blue;
appeared at the very end of the css, it seems to not detect it at all.
I will add a test at the end of the css parsing that will keep track of nest level and generate an error if not properly nested.