From: Glenn Adams <[email protected]>
| It already exists, e.g.,
|
| <HEAD>
| <TITLE>Doc with arbitrary style directives</TITLE>
| <STYLE NOTATION=css>
| [ID=P123] { color : red }
| </STYLE>
| </HEAD>
| <P ID=P123>A random red paragraph.</P>
|
| The STYLE attribute isn't necessary, complicates implementations, and
| promotes bad usage.
---
Oh, come on. The example is not one whit better than putting the
styling directly on the paragraph. It has no readability,
debuggability, reusability, or other advantage.
I disagree, both as an author of documents and as a UA (with CSS support)
implementer. [I architected and implemented our style sheet support].
It is more readable because style data is stored in one location rather
than randomly distributed through the document.
It is more debuggable because the single ID rule can be reused and therefore
its parsing need not be replicated.
It is more reusable since it can be used with any element.
As for other advantages, (1) it preserves separation of content and
presentation data; (2) it restricts the scope of the style language parser
(i.e., the parser need only be instantiated once during document header
processing); (3) it permits optimizations in the represesntation of
style rules through automatic merging that can only occur when all
style rules are available (incremental merging is more costly); (4) it
permits better resource usage since the UA can predict processing and
formatting requirements earlier.
In either case you have pure, unblemished, ad hoc styling.
I'm not arguing for or against ad hoc styles. I'm assuming they will
exist and be used. I'm arguing for where they are specified and when
they must be processed (compiled).
The only argument I've seen for style attributes that has any merit
is that it permits lazy typists to be lazier. Is that your argument?
Regards,
Glenn Adams