XML technologies / XML / XML in a Nutshell / Cascading Style Sheets (CSS) / The levels of CSS
(Excerpt from "XML in a Nutshell" by Elliotte Rusty Harold & W. Scott Means)
When this book was written (in 2005), there were several versions of CSS. CSS Level 1 was an early W3C Recommendation from 1996, used only for HTML although extending it to XML was an obvious step. The CSS Level 1 specification was incomplete and led to inconsistent browser implementations.
The next level, CSS Level 2, added many new properties. It also puts XML on an equal footing with HTML. In fact, CSS Level 2 often works better with XML than with HTML because CSS styles need not interact with predefined presentation semantics. For the most part, CSS Level 2 is a superset of CSS Level 1. This means that all CSS Level 1 stylesheets are also CSS Level 2 stylesheets with much the same meaning.
The current version is CSS 2.1 (2011). CSS 2.1 adds a few minor values to existing properties—for example, orange is now recognized as a color—but, above all, it removes CSS Level 2 features that browsers have not yet implemented. It also corrects some errors in the CSS2 specification.
The W3C is currently working on CSS Level 3. Once complete, it will modularize the CSS specification so that programs can implement particular subsets of CSS functionality without having to implement everything. For example, an audio browser could implement audio stylesheets while ignoring the visual formatting model. CSS Level 3 also extends CSS with features and properties including multicolumn layouts, better support for non-Western languages such as Arabic and Chinese, support for XML namespaces, more powerful selectors, paged media, and much more. However, CSS Level 3 has not yet been implemented in any browser.
Copyright © 2005 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from the book "XML in a Nutshell" is subject to the same conditions as the printed edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de
back to top