less.ruby
less.ruby copied to clipboard
Comment in property name causes syntax error
Although this is probably not great CSS, I came across a third-party library that less is chocking on because the library uses a workaround for IE5:
.test { display/*/: none; / Hide for IE5 */ }
The problem is with the /**/ in the property name.
If this is invalid CSS, I can file a bug with the library's maintainer. Thanks!
It's not valid CSS. It's commenting out the value. Also, if it's only for IE5, you should consider removing it completely.
It should be:
.test { display: none; /* Hide for IE5 */ }
I don't think it's considered valid CSS. From the W3C:
Comments begin with the characters "/" and end with the characters "/". They may occur anywhere outside other tokens
The "other tokens" would consist of the colon and semicolon. Essentially, anywhere outside of a CSS rule.