On Sun, 2009-04-26 at 11:40 -0400, tedd wrote:
> At 9:47 AM -0400 4/26/09, Robert Cummings wrote:
> >On Sun, 2009-04-26 at 14:49 +0100, Ashley Sheridan wrote:
> > > On Sun, 2009-04-26 at 09:41 -0400, tedd wrote:
> > > > <span class="red"><?php echo('hello'); ?></span><?php echo(' there');
> > ?>
> > > >
> > > I'd go further on that and say don't call your class 'red', as it
> > > doesn't do anything for semantic code, but that's just me trolling ;)
> >
> >I was about to say the same thing *lol*. tis true though, the class
> >should be "doubleQuoted" or something similar. What happens when they
> >decide it should be blue?
> >
> >span.red
> >{
> > color: blue;
> >}
> >
> >Uh huh, uh huh, uh huh :)
>
>
> I fully understand, but I also see two side to this.
>
> On one side, I agree that one should always keep attributes vague
> enough so they can be anything, such as class="warning" and that way
> the client may say "I don't want it red now, but orange" and it will
> be easy enough to change.
>
> On the other side, some attributes may be exactly what they claim,
> such as class="center" or class="red". There is little confusion
> about what those classes mean as compared to more vague terms. As
> such, exact attributes are indeed semantic.
>
> So as I see it, with *some* attributes it's a toss-up -- you can add
> a layer of abstraction by making them vague OR you can use a more
> exact (semantic) meaning. I don't find much fault with either way
> provided that it's not a big problem later. The dividing line here is
> one of how much work it causes.
>
> Additional consideration, one can combine exact attributes, such as
> class="center red" and it both works and is obvious.
>
> I often have in my css, rules such as:
>
> .center
> {
> text-align: center;
> }
>
> .red
> {
> color: red;
> }
>
> While it might not fit with the purest css, it works for me. YMMV. :-)
>
> Cheers,
>
> tedd
>
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>
I think with semantic CSS names, it's more about why the text has to be
red, than what colour it is. So if it's red because it is a warning,
alert, etc, then it can sometimes be better to give it a name that
reflects that. This is mostly down to preference though really. I say
mostly, because some UA's might use the class names to derive
microformat information, such as dates, author names, etc.
Ash
www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php