At 3:10 PM +0100 5/12/08, Lee Powell wrote: >Hi > >I'm working on a new project, and I'm keen to get my naming conventions down >to convey meaning in what I'm marking up. >Anyway, design have produced a layout which makes use of the normal elements >along with 2 rather odd block style buttons, there's nothing unique about >them, except they are normal anchors with a bit of padding. One style has a >black background and the other grey, both with white text. > >So my markup looks like this: > ><span class="button"><a href="...">This is a button</a></span> > >So I need a naming convention to differentiate between the two, and I really >don't want to use 'black' and 'grey' for obvious reasons, 'style-a' and >'style-b' doesn't seem to convey much meaning... > >So has anyone else got other ideas on how to name these seemingly >miscellaneous elements? >
I'll probably get hammered for this, but I often use semantic markup for things like color and align like this: .green-bg {background:#29a54a;} .green-tx {color:#29a54a;} .right (text-align: right;} .left (text-align: left;} Then in the html, it becomes obvious what I'm trying to do, like: <p class="green-tx right">Green text aligned right</p> In your case, I've used things like: .buy-btn {color:#ff0000; background: #000000; } for: <span class="buy-btn"><a href="...">This is a BUY button</a></span> For me, the point is to make this easy for ME to use, review, and understand later. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/