This is a legacy document, and retained on the site in order to avoid link rot. The content is likely no longer (a) accurate, (b) representative of the views and philosophies of current site management, or (c) up to date.

How one specific implementation of CSS came to be

-

Jan Roland Eriksson

Historical notes on JSSS

A snip from a ciwas post

For any one that has been around long enough to know the “story” on how some parts of CSS even came to be in the NS4 generation of browsers, it should be apparent that it comes down to a part of programming that never had a chance to be properly implemented or debugged before the already stipulated release date for NS4.

Recapitulation of some facts

NS had their own proposal up at W3C for something they called JSSS (JavaScript Style Sheets) in August 1996, and it was not even fully defined when it was submitted. But following “standard NS procedures” of that time, they had already worked JSSS into their upcoming generation 4 code.

Any way, their proposal was turned down in favor of the real CSS1 proposal, as we know it in recommendation today.

Given the fact that this happened in late 1996 and the first NS4 release was already set to happen in early 1997, NS programmers was left with a situation where they only had a few months available to produce code to get some of the real CSS1 into their browser.

Now a decision was taken to build onto the already available JSSS engine and just produce a translator from CSS1 over to JSSS. That translator was produced in almost no time, not very much debugged, and most important, the parts of CSS1 that could be relatively good supported in NS4 was only those parts that could be directly mapped over from CSS1 to the unfinished JSSS engine to start with.

This involves e.g. suggestions for font colors and sizes, but even here the implementation breaks in certain areas since the CSS concept of ‘inheritance’ could not be fully supported.

The result, as we got it

These facts explains, among other things, why it is required to have JavaScript enabled in NS4 in order to make use of CSS at all. All CSS rendering in NS4x is done through their JavaScript engine as the final design came to be.

Any minor change in CSS behavior that may have happened up to the latest version of NS4x is only a result of changes made in the JS engine, changes that have been implemented mostly for other purposes, like tightening up security leaks, where altered CSS behavior would just be a side effect.

Any one that would care to try find NS’s original JSSS proposal at the W3C site, might find it amusing to see that it still "works" as described for all NS4x browsers up til today, but nowhere else of course. (and it should also be noted that NS has officially abandoned JSSS)

Knowing a bit about JSSS also creates a base for how to understand the CSS implementation in NS4. Rules that maps 1:1 between the two (admittedly not many) usually works fairly good, for anything else it will just be a game between bugs in the CSS — JSSS translator and the JS engine, that adds or subtracts from each other in a most unpredictable way.

There are no guarantees that can be given for NS4x and how it will handle CSS in any given situation. The CSS box rendering model is completely broken, CSS borders likewise, and much more of the CSS fine print of course.

For an introduction to CSS bugs in the NS4x family of browsers please refer to The CSS Pointers NS4x Bug Page .

Go figure …

Post scriptum …

In all fairness it shall be mentioned that NS has taken on a very different approach to CSS as of some time back. The work as presented through The Mozilla Project is all geared up towards producing as much of an HTML4, CSS1 and CSS2 compatible browser as they are ever capable of doing.

We can also find support in their code for the more modern variants of markup. Developers will love that of course.

A lot of the code work at mozilla.org has been done by Netscape employees, but also heavily supported by a number of knowledgeable CSS experts. I have been following most of their releases so far, and I’m fairly confident that we will get a really good CSS capable browser coming out of it, as in what has already appeared a couple of times as Netscape 6/7 Previews.

As things stands today, it seems that, for a Win based environment, there are only two browser code bases, Opera v3.6x and up , and variations on Mozilla releases that can claim a really high level of conformance to CSS.

IE5x for Mac is also claimed to be close to be very good in its CSS support, but I can’t tell, since I don’t have a Mac to do my own tests on.

IE5/6x for Windows? Sorry, there’s a long way to go for them, still.