Are there any known issues with putting invalid CSS class characters (@,:,!) in the class attribute of a HTML element? Like this:
<input type='text' class='compare id:txtSecondary'/>
<input type='text' class='compare @txtSecondary'/>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
CSS fun fact! In section 4.1.3 of the Syntax and Basic Data Types (of CSS2) recommendation, it says…
So you can include special characters in your CSS:
Additionally, the
classattribute is a cdata-list which basically means “any text except new lines and multiple spaces“.So you can include something like this in your markup:
Your problem isn’t so much the
@or the:characters, but those spacesyou’ve tossed in. (since in theclassattribute spaces mean something special: “Multiple class names must be separated by white space characters.“)