On Fri, 10 Mar 2006 13:57:06 +1000, Eric Lindsay
<NOSPAmar2005@ericlindsay.com> wrote:
[color=blue]
>In article <om0t02t6cmicmdsev8f9fqvhh4f20qjula@4ax.com>,
> Stephen Poley <sbpoleySpicedHamTrap@xs4all.nl> wrote:
>[color=green]
>> I have to say I find these :before and :after pseudo-elements (not tags)
>> very dubious. CSS has no business modifying HTML content. There *may* be
>> a handful of cases where they can be used sensibly. But if IE ever
>> implements them I'm quite sure that in 99% of cases they will be used
>> inappropriately.[/color]
>
>Personally I like the idea of the :before and :after pseudo-elements,
>although I am not sure exactly how to best make use of them as yet.
>
>However I am not precisely seeing how their use modifies HTML content
>any more than any other use of CSS.[/color]
I would have thought it rather clear that inserting a block of text is a
different category of operation to, say, colouring existing text blue.
[color=blue]
> Unless you are implying that CSS
>should not create content (say text, as below) on a page? In which
>case, would not the use of background images in CSS fall into the same
>category?[/color]
If the background images contained textual content, that would be an
abuse of CMS. Anything can be abused. However the "natural" use of
background images is sensible. It seems to me that :before and :after
positively encourage abuse.
[color=blue]
>Using pseudo-elements in the CSS for my header:
>
>#header li:before { content: "| "; } /* Pipe symbol except on first */
>#header li:first-child:before { content: ""; }
>
>/* The current folder is floated right and marked >> in the header */
>#folder { display: inline; float: right; }
>#header #folder:before { content: ">> "; }[/color]
<snip rest of example>
I haven't looked at this in detail (I'm about to leave for the rest of
the day). If however this was the CSS for one class of device (black and
white?) whereas another class of device used something different
(colouring?) then I'll concede that you may have a situation where they
are justified. However using CSS merely to make your HTML source look
prettier would seem to me to be abuse.
--
Stephen Poley
http://www.xs4all.nl/~sbpoley/webmatters/