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?
    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:

   text-align: center;

   color: red;

While it might not fit with the purest css, it works for me. YMMV.  :-)




PHP General Mailing List (
To unsubscribe, visit:

Reply via email to