Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Comment in property name causes syntax error #198

Open
rmunch opened this issue Sep 14, 2012 · 1 comment
Open

Comment in property name causes syntax error #198

rmunch opened this issue Sep 14, 2012 · 1 comment

Comments

@rmunch
Copy link

rmunch commented Sep 14, 2012

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!

@hemmendinger
Copy link

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 */
}

@mindfullsilence
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants