The concerns of the initial memo were:
 
1. what is the best practice to name your classes and IDs NOW, so you won't 
have to rewrite them TOMORROW?

2. What naming conventions do YOU use in your everyday pratice?

According to this memo, 1 is satisfied primarily by avoiding underscores.
 
As for 2, these days I'm most likely to...
 
doThisButMostlyCuzIDoALotOfJSPCodingAndTendToFollowJavaNamingConventions.

But-To-Me-This-Style-Is-OK
 
AndSoIsThis
 
buthistendstogetquiteunreadableforlongnamessoiwouldavoidit.
 
Actually, IMHO consistency is much more important than a particular naming 
convention.
 
Stan

Uwe Kaiser <[EMAIL PROTECTED]> wrote:
Mikhail Bozgounov schrieb:

>
> A) lowercase: #mainnav, #subnav, .bannersmall, .firstpara
> B) lowerCase: #mainNav, #subNav, .bannerSmall, .firstPara
> C) lower-case: #main-nav, #sub-nav, .banner-small, .first-para
> D) lower_case: #main_nav, #sub_nav, .banner_small, .first_para
>

-----------------------------------------------------------------------
CSS2, chapter 4.1.3

In CSS2, identifiers (including element names, classes, and IDs
in selectors) can contain only the characters [A-Za-z0-9] and
ISO 10646 characters 161 and higher, plus the hyphen (-); they
cannot start with a hyphen or a digit.
-----------------------------------------------------------------------

The underscore is IMO NOT correct CSS2 syntax, but since almost all
browsers support it, it will be allowed in CSS2.1

Because underscore is not supported by MSIE4, Opera5, and Netscape 6.?,
you should avoid its use, if you intend to support these browsers.


THE GOAL OF CSS2.1 IS NOT TO BE A NEW STANDARD, but rather an adaption
on the world of browser reality.
-----------------------------------------------------------------------
CSS2.1, chapter 4.1.3

All CSS style sheets are case-insensitive, except for parts that are
not under the control of CSS. For example, the case-sensitivity of
values of the HTML attributes "id" and "class", of font names, and of
URIs lies outside the scope of this specification.
Note in particular hat element names are case-insensitive in HTML, but
case-sensitive in XML.

In CSS 2.1, identifiers (including element names, classes, and IDs
in selectors) can contain only the characters [A-Za-z0-9] and
ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and
the underscore (_); they cannot start with a digit. Only properties,
values, units, pseudo-classes, pseudo-elements, and at-rules may start
with a hyphen (-); other identifiers (e.g. element names, classes,
or IDs) may not.
-----------------------------------------------------------------------

Classes and IDs beginning with a underscore, are supported by MSIE 5/PC
and up only, at the time, but it is IMO correct CSS2.1 syntax.

Browsers, as MSIE 5 and Opera older 7 can't tell #Nav and #nav apart.
In some special constallations Opera 5/6 can differ it, though!

regards,
Uwe Kaiser

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to