Hi Jens,

It would cause a conflict in CSS because of multiple class selectors:

    http://www.w3.org/TR/CSS2/selector.html#class-html

For example:

    <div class="class1 class2">This has two classes</div>

can be targeted with:

    div.class1.class2 { color: red; }

Using a dot in the class name itself would be an ambiguous selector. Does
"div.rating-L4.5" mean "the div with class rating-L4.5" or "the div with
class rating-L4 and class 5"?

As such, while it is valid (as per Sam's email that just came through) I
really wouldn't recommend it. Stick to lowercase letters, numbers and dashes
in your class names I reckon.


--
Tatham Oddie
au mob: +61 414 275 989, us cell: +1 213 280 9140, skype: tathamoddie

-----Original Message-----
From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org] On
Behalf Of Jens-Uwe Korff
Sent: Friday, 12 March 2010 11:12 AM
To: wsg@webstandardsgroup.org
Subject: [WSG] Using a dot "." in a class name

Hi all,

I've noticed that YouTube uses a dot for its star rating:

<button class="[...] ratingL ratingL-4.5">

It seems to work in browsers, but I'd like to know if this character is
valid and if it might have future implications if used that way.

Thanks,
Jens


The information contained in this e-mail message and any accompanying files
is or may be confidential. If you are not the intended recipient, any use,
dissemination, reliance, forwarding, printing or copying of this e-mail or
any attached files is unauthorised. This e-mail is subject to copyright. No
part of it should be reproduced, adapted or communicated without the written
consent of the copyright owner. If you have received this e-mail in error
please advise the sender immediately by return e-mail or telephone and
delete all copies. Fairfax does not guarantee the accuracy or completeness
of any information contained in this e-mail or attached files. Internet
communications are not secure, therefore Fairfax does not accept legal
responsibility for the contents of this message or attached files.


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to