From: tedd on
At 10:34 AM -0400 4/30/10, Paul M Foster wrote:
>On Thu, Apr 29, 2010 at 05:34:38PM -0400, tedd wrote:
>
> > Please critically review my example.
>
>+1
>
>This thread came up before, and tedd's solution was the least complex,
>as far as I could tell. I shamelessly stole his code and regularly use
>it in my own projects. ;-}
>
>Paul

Paul:

Thanks for the plug.

All the code I provide on this list and on my various web sites is
for free for anyone, except for "governments" (i.e., local, state,
federal, other), to use, review, and/or comment as they wish without
any obligation to me. Oh, as for "governments" if you want a copy of
anything please contact me directly, I have a few forms for you to
fill out.

The point of sharing is to improve product -- agile works.

My livelihood is not compromised because someone is using a small
snip-it of mine. Hopefully my real code (the stuff I sell to clients)
is more involved and has more value than that.

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
From: tedd on
At 4:37 PM +0200 4/30/10, Jay Ess wrote:
>Paul M Foster wrote:
>>+1
>>
>>This thread came up before, and tedd's solution was the least complex,
>>as far as I could tell. I shamelessly stole his code and regularly use
>>it in my own projects. ;-}
>>
>Or if one choose to use Smarty template.
><tr bgcolor="{cycle values="#eeeeee,#d0d0d0"}">
>
>http://www.smarty.net/manual/en/language.function.cycle.php

Yeah, like that keeps presentation separate from data while making
things simpler, right? I don't think so.

Embedding styling attributes in html is simply not following "best practices".

For example, if you have 100 pages of the above embedded code and the
client says "Hey, let's change the color of that table" -- then you
are going to have to change 100 pages of code whereas if you followed
"best practices" then you would change only one rule in css.

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
From: Ashley Sheridan on
On Fri, 2010-04-30 at 13:59 -0400, tedd wrote:

> At 4:37 PM +0200 4/30/10, Jay Ess wrote:
> >Paul M Foster wrote:
> >>+1
> >>
> >>This thread came up before, and tedd's solution was the least complex,
> >>as far as I could tell. I shamelessly stole his code and regularly use
> >>it in my own projects. ;-}
> >>
> >Or if one choose to use Smarty template.
> ><tr bgcolor="{cycle values="#eeeeee,#d0d0d0"}">
> >
> >http://www.smarty.net/manual/en/language.function.cycle.php
>
> Yeah, like that keeps presentation separate from data while making
> things simpler, right? I don't think so.
>
> Embedding styling attributes in html is simply not following "best practices".
>
> For example, if you have 100 pages of the above embedded code and the
> client says "Hey, let's change the color of that table" -- then you
> are going to have to change 100 pages of code whereas if you followed
> "best practices" then you would change only one rule in css.
>
> Cheers,
>
> tedd
>
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>


I agree. Inline styles are useful in a few fringe cases, but if you can
avoid them then it's best practice to do so.

Thanks,
Ash
http://www.ashleysheridan.co.uk


From: tedd on
At 7:26 PM +0100 4/30/10, Ashley Sheridan wrote:
>>On Fri, 2010-04-30 at 13:59 -0400, tedd wrote:
>>At 4:37 PM +0200 4/30/10, Jay Ess wrote:
>>>Paul M Foster wrote:
>>>>+1
>>>>
>>>>This thread came up before, and tedd's solution was the least complex,
>>>>as far as I could tell. I shamelessly stole his code and regularly use
>>>>it in my own projects. ;-}
>>>>
>>>Or if one choose to use Smarty template.
>>><tr bgcolor="{cycle values="#eeeeee,#d0d0d0"}">
>>>
>>><http://www.smarty.net/manual/en/language.function.cycle.php>http://www.smarty.net/manual/en/language.function.cycle.php
>>
>>Yeah, like that keeps presentation separate from data while making
>>things simpler, right? I don't think so.
>>
>>Embedding styling attributes in html is simply not following "best
>>practices".
>>
>>For example, if you have 100 pages of the above embedded code and the
>>client says "Hey, let's change the color of that table" -- then you
>>are going to have to change 100 pages of code whereas if you followed
>>"best practices" then you would change only one rule in css.
>>
>>Cheers,
>>
>>tedd

>I agree. Inline styles are useful in a few fringe cases, but if you
>can avoid them then it's best practice to do so.
>
>Thanks,
>Ash
><http://www.ashleysheridan.co.uk>http://www.ashleysheridan.co.uk

Ash:

The only "fringe" cases I can think of are those that could be solved
by using a <span> tag.

Do you have any examples otherwise?

Cheers,

tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
From: Ashley Sheridan on
On Fri, 2010-04-30 at 15:59 -0400, tedd wrote:

> At 7:26 PM +0100 4/30/10, Ashley Sheridan wrote:
> >>On Fri, 2010-04-30 at 13:59 -0400, tedd wrote:
> >>At 4:37 PM +0200 4/30/10, Jay Ess wrote:
> >>>Paul M Foster wrote:
> >>>>+1
> >>>>
> >>>>This thread came up before, and tedd's solution was the least complex,
> >>>>as far as I could tell. I shamelessly stole his code and regularly use
> >>>>it in my own projects. ;-}
> >>>>
> >>>Or if one choose to use Smarty template.
> >>><tr bgcolor="{cycle values="#eeeeee,#d0d0d0"}">
> >>>
> >>><http://www.smarty.net/manual/en/language.function.cycle.php>http://www.smarty.net/manual/en/language.function.cycle.php
> >>
> >>Yeah, like that keeps presentation separate from data while making
> >>things simpler, right? I don't think so.
> >>
> >>Embedding styling attributes in html is simply not following "best
> >>practices".
> >>
> >>For example, if you have 100 pages of the above embedded code and the
> >>client says "Hey, let's change the color of that table" -- then you
> >>are going to have to change 100 pages of code whereas if you followed
> >>"best practices" then you would change only one rule in css.
> >>
> >>Cheers,
> >>
> >>tedd
>
> >I agree. Inline styles are useful in a few fringe cases, but if you
> >can avoid them then it's best practice to do so.
> >
> >Thanks,
> >Ash
> ><http://www.ashleysheridan.co.uk>http://www.ashleysheridan.co.uk
>
> Ash:
>
> The only "fringe" cases I can think of are those that could be solved
> by using a <span> tag.
>
> Do you have any examples otherwise?
>
> Cheers,
>
> tedd


I can't think of any right now, but I know that on occassion I've used
inline styles where I know that the style will never be repeated and was
a one-off style to just perform a quick fix. I know it's a messy thing
to do, but I'm sure there must be a good reason for them somewhere!

Thanks,
Ash
http://www.ashleysheridan.co.uk