At a recent interview I was asked the question \"Is CSS giving error?\" by the interviewer.
Is there an interpreter working behind CSS which blocks
Is CSS giving error ?
Yes, any rule which cannot be understood by CSS parser will lead to an error. In general any data which cannot be handled by a system/program will lead to an error. But how the system finally handles that error is your question and it can be
The CSS parser will not halt on an error. It just puts an error log to the console if it finds any invalid css property which cannot be parsed/ mentioned in specs and ignores(1) all the css-rule data till it finds next ;.
As w3c.org doc says
A UA must skip a declaration with an invalid property name or an invalid value.
Here UA(User Agent) means browser in our case. So the invalid css keys/values has to be skipped and the browser vendor may choose to show error in devtools/firebug to help developers to fix it. Also it is browser vendor dependent to put error logs or not.