back to Web Design

CSS2 Compliance

We are not early adopters of CSS2 (Cascading Style Sheets Level 2). The specification was first published by W3C in May of 1998.

It is our understanding that the debate still rages on among those for and against the use of CSS2. For this reason, we thought we'd dive right in and form our own opinions. Eventually we want our site to proudly display the seals of CSS2 and XHTML approval!

The first thing we notice is that redoing a site to use CSS2 takes a lot of work! The work includes a rather steep learning curve as not only the grammar of CSS2 must be learned but also some rather advanced concepts such as the visual formatting model and the rules for the cascade. The cascade rules are many and one better have the manual nearby to sort out potential conflicts. Conflicts can occur easily because a CSS2 page is rendered based on many factors, including the author's code, the brower's code, and the user's code (the user may specify a file that contains a style sheet). There are hacks to do overrides, such as specifying the !important rule.

We can see why there is still such a debate and many coders wish to continue to use tables. The specification is 338 pages and extremely nitpicky. We found it more difficult to learn than a programming language because of the tremendous detail in the visual formatting model. Also the different ways that the browsers interpret the CSS can be very annoying. One of the ways the interpretation differs is in the way the box model is interpreted and thus there came a need for various 'hacks'. I think developers have enough to worry about without having to write these browser hacks.

The desire and necessity to create an easy-to-maintain website is one reason web site development should be left to the professionals. We don't think that the average guy-off-the-street can build you a site which can grow and change easily while at the same time comforming to the latest W3C standards.

Orange Crystal Consulting found that leveraging CSS2 was right in line with efficient software development practices. Encapsulating layout within stylesheets not only makes our HTML easier to edit, but it also makes it easier to apply site-wide changes. Encapsulation is a foundation of object-oriented design and so we are very comfortable encapsulating style. CSS2 separates content from formatting. Although we know there are still problems in the way browsers interpret stylesheets, we did not encounter any show-stoppers in using style sheets in this site.

We are content that we can quickly make changes to the site, especially regarding typography. With this in mind, we love the fact that simply by changing our stylesheets, we will be able to apply site-wide typographical changes to color, font-family and other typographical aspects.

Nevertheless, whoever will leverage CSS2 better thoroughly understand the box model and the visual formatting model. We found that printing the entire specification and reading straight through it was necessary to put our heads around it. In CSS2-speak, the 'viewport' of the display device really does the spec an injustice. If the spec is some kind of bible, then it's best to carry it wherever you go! We doubt if any quick web programming course would give the student a thorough understanding of the intricacies of CSS2 and so I think the spec is really for super-geeks.

Not only does CSS2 make typography easier, it also makes layout easier. We look forward to developing sites in GoLive because of the ease in which one can apply styles through the GUI (Graphical User Interface). Nevertheless, we were happy to handcraft stylesheets in the beginning because it gave us a deep understanding of their mechanics. We feel that the novice could easily get lost in GoLive without having a firm grip on the spec.

We believe that developing efficient stylesheets for our site is a good investment in time so we have taken the time to learn the entire spec. It reminds us of the tremendous benefits gained by doing proper object oriented design before sitting down to code. It's a little more work in the beginning, but project maintenance becomes much easier in the long run. The corollary to this is that without proper planning, a project may become impossible to manage in its maintenance phase. This knowledge is something that comes from experience. Proper requirements and design phases has always resulted in a more easily maintained system. The alternative is commonly referred to as hacking.

Clients want to be able to make changes to a system quickly. By having a thorough understanding of CSS2, Orange Crystal Consulting is positioned to save the customer real dollars when it comes time to make those 'few little changes' to their websites.