Yes it is not a fully validating parser (yet). Adding checks on specific direct internal state transitions that are not allowed will catch most of those. In other words transitioning from in import directly to in selector or in property would help detect those cases.
But the older CSSInfo did no validation at all, and incorrectly parsed valid css at times!
I will look into it. Thanks!
|