Re: Javascript Enabled Style Sheets vs. CSS

On Mon Jan 20 03:56:38 1997, in <v03010d01af08805de629@[]>, 
Todd Fahrner wrote:
>At 20:12 -0500 1/19/97, Paul Ford asked:
>> Will someone compare and contrast between Netscape Communicator's
>> Javascript-enabled Style Sheets and W3-endorsed Cascading Style Sheets?
>> I'm baffled.
>I think that's the idea. <g>
>> What is the advantage of the new Netscape-specific style sheets?
>The advantage for whom? Netscape-specific "proposed standards," like the
>new <layers> tag and shifting implementations of JavaScript, can themselves
>be advantages to Netscape as long as they command the greatest market
>share. Apologies in advance if my cynicism is unwarranted - I've heard no
>more compelling explanation.
>> What functionality does J-ESS offer over CSS?
>J-ESS (aka JSSS, JASS) will offer scripted, dynamic control over styling,
>rather than the simple declarative styling CSS1 offers. Rather than
>normalize CSS1 and complement it with a separate script/object model,
>however, Netscape will offer an all-in-one styling/scripting solution,
>allowing authors to bypass CSS1. They claim that they will be supporting
>CSS1 in parallel, but are promoting only their "proposed standard"
>alternative. It is unclear to me whether NS4 will allow
>degradation-conscious authors to use standard CSS and inessential
>JavaScript extensions together.


Here's what I've heard - JSSS offers dynamic styling that allows an author
to base styles on anything that can be accessed with JavaScript, including
user input.  However, it does not allow style that depends on the document
structure (Netscape currently throws away the tree structure of the document
as soon as it is replaced with processing instructions), which CSS does
allow.  Thus, if authors are happy enough with JSSS, Netscape can simply
provide hooks into its current document formatting code, instead of
replacing most of it. 

From what I know, one easy way to combine CSS and JSSS instructions will
probably be to use an external stylesheet (external to the body of the
document, that is, so it could be in the <STYLE> element) with CSS
instructions, and insert JSSS instructions in the document locally (just as
you would insert FONT tags now).  I am not certain of the state of the JSSS
spec, so I can't guarantee this would work, but I would probably bet on it
anyway since every other Netscape enhancement seems to work this way.

Quick summary:
1) JSSS allows user input and, in principle, more complicated styles than
2) To get these more complicated styles, the *author* needs to parse the
document, so expressing reasonably complicated styles is much easier in CSS
than in JSSS.