JSSS (JavaScript Style Sheets) is a little known part of web history. What makes it so interesting is that is the primary reason behind Netscape 4's awful rendering of CSS.

JSSS was a W3C recommendation proposal cooked up by the Netscape development team. It was similar to CSS with a Javascript-style syntax. Exemple:

    <LINK REL=STYLESHEET TYPE="text/Javascript"
      HREF="http://style.com/cool" TITLE="Cool">
    <STYLE TYPE="text/javascript">
      tags.H1.color = "blue"
    <H1>Headline is blue</H1>
    <P STYLE="color = 'green'">While the paragraph is green.

</BODY> </HTML> The box model was also very similar. A major difference, however, is that JSSS wasn't just a presentational language like HTML or CSS but a programing language. For exemple, you might assign to an object's left margin the result of a function (object.leftMargin = functionresult()), a variable (object.leftMargin = x) or the result of an arithmetic operation (object.leftMargin = 1+1).

Even though the programing function would have been nice, the proposal was overall weaker than CSS and so was rejected in favor of the latter. However, by the time it was rejected (late 1996), JSSS had been largely implemented into Netscape 4... which was due early 1997. The developpers, in a hurry, simply mapped all CSS properties to a similar JSSS property - if there was a direct translation possible. However, the box models, for all their similarity, still had some differences that can make it all fall apart sometimes. JSSS didn't support inheritance, either. Anyway, the whole translation was done hastily and was largely a mess - but you knew that already ;).

A thing that might interest some of you is that JSSS is apparently present in Netscape 4.x. If you want to try it, the JSSS proposal can be found at http://www.w3.org/Submission/1996/1/WD-jsss-960822.html. You'll note, however, that it doesn't appear to be quite complete and some parts could have been explained much better. Anyway, if you want to tinker, give it a go!

Log in or register to write something here or to contact authors.