Re: Naming files, classes, ids...
- From: Davémon <nospam@xxxxxxxxxx>
- Date: Thu, 10 Nov 2005 10:55:27 +0000
dorayme wrote:
Anyway, I know it has been said to keep to lower case for most
of these things to avoid trouble. But if one is consistent, what
trouble has anyone ever experienced?
I've never had any trouble, using all lowercase and underscores '_' in place of spaces to separate words to aid the eye, which is a bit more what the eye is used to reading than CamelCaps.
I like to try to name classes and id's in css as meaningfully as possible, rather than describing the styling. i.e. i'd use .story_text in preference to .middle_content, so that when I decide that the middle really should be on the left, the name still remains correct. When there are things that are just done for presentational reasons rather than semantic ones,I give them obviously layout-orientated names like #column_one
Having said that, recently I've taken up using hyphenated filenames as it's suggested Google et al. recognise each individual word that way. But it seems counter-intuitive to me as the normal use of a hyphen is to literally combine things together, not separate them...
http://www.prweaver.com/blog/2004/08/26/2-hyphen-and-underscore
--
Davémon http://www.nightsoil.co.uk .
- Follow-Ups:
- Re: Naming files, classes, ids...
- From: dorayme
- Re: Naming files, classes, ids...
- References:
- Naming files, classes, ids...
- From: dorayme
- Naming files, classes, ids...
- Prev by Date: Re: control types
- Next by Date: Re: control types
- Previous by thread: Re: Naming files, classes, ids...
- Next by thread: Re: Naming files, classes, ids...
- Index(es):