W3C

Bert Bos | CSS level 3: past, present & future

CSS level 3: past, present & future

The present and future of typography on the Web

Cascading Style Sheets

Bert Bos (W3C) <bert@w3.org>
Presented at:
Bilbao Web Summit
Bilbao, Spain
May 18, 2011

History and goals

CSS Level 1: 1996 — CSS Level 2: 1998

Original goal for CSS2 was something not far beyond current CSS2. No plans for CSS3 at the time.

But CSS proved more popular and durable than expected, and also browsers proved unable to fix bugs (partly caused by underspecified spec).

Usage growth

Graph:

CSS usage has grown from 66% of all Web pages in 2006 to 78% now.
(Error margin unknown. Based on sampling HTML only, no SVG or XML.)

State of level 2

Margins, borders

Fonts & styles

Colors, backgrounds

Tables, floats

Absolute positioning

Page breaks

Lists, numbering

Bidi (Hebrew, Arabic)

Status

Note that experimental support, based on working drafts, can always be distinguished from stable support, because experimental CSS properties always start with a "-" (e.g., '-moz-columns'), while standard properties start with a letter ('columns').

Why level 3?

As I said, the original aim for CSS was just a little more than what is in the current level 2. A few things that we thought were possible turned out to be more difficult than expected. Technology wasn't ready yet. And in the case of embedded fonts, the legal environment was lacking, too. So we left some features out of level 2 and decided to create a third level for CSS.

Apart from embedded fonts, the features that implementers couldn't handle were speech synthesis (there are partial implementations, especially in accessibility tools, but not at the same level of stability as the rest of CSS level 2), displaying labels and headers partly embedded in the first line of the next paragraph ('compact' and 'run-in'), and stretching/shrinking letters.

Meanwhile, CSS got more popular and people started proposing new features. And it turned out most of those features could in fact be added. We had designed CSS to be extensible, just in case its successor took long to arrive, but CSS was even more extensible than we thought.

W3C made a second style sheet language, XSL, which is more powerful than CSS, but people liked the model and syntax of CSS better. XSL re-focused on complex printing tasks and on server-side processing. And the idea of freezing CSS and replacing it with something better got frozen itself.

What is in level 3?

Diagram:      CSS has some 40 modules, each dealing with a specific aspect of      typography. CSS level 1 is the core of CSS, with the most basic      features from most of the modules. Level 2 is a superset of      level 1, containing more from each module than level 1. And      level 3 is currently planned to contain everything from every      module.

Three levels and about 40 modules

There is a lot in level 3. We don't actually know yet what level 3 will consist of eventually. While some modules are already done, others are just early drafts and features are still being added.

What is certain is that level 3 will contain everything from level 2, and level 2 contains everything from level 1. There may some day be a level 4. but that has not been decided yet.

Some features of level 3

Transformations done through CSS avoids the need for images (thus makes text more accessible, searchable) and also allows more flexibility, faster development and smaller downloads.

Columns and grid layout allow keeping the source in logical order and allows reuse of the same documents for different devices without changing the mark-up. That also helps accessibility, as it is no longer needed to put text in reverse order to get text in columns.

“When can I use it?”

CSS 2007 snapshot

CSS 2010 snapshot

There are many modules with many features. We need to establish the precise requirements, find the right experts, organize reviews, write test suites, wait for implementations… We cannot do everyhting at the same time. And not everything has the same priority. Some modules are finished, others are well advanced, others still need a lot of work, and yet others are hardly more than an idea.

So we have work for several years. But we cannot let people wait many years for level 3 when some parts of it are in fact already done and tested. And so the working group decided to publish snapshots to describe the state of CSS at certain points in time.

There are two snapshots so far. One which was originally planned to for 2007, but got delayed a bit. It is called the 2007 snapshot, but in fact it is more the 2009 snapshot.

But that hardly matters, because there is already a second snapshot, for 2010. It describes the current state of CSS and lists the modules that are either already official standards, or very close to it, and thus stable enough for everyday use.

Formally, the snapshots are targeted at implementers. The parts of CSS that are listed in the snapshots are implemented and considered stable, and other implementers are encouraged to implement those parts, too. And implement them in preference to less stable parts, so that all the implementations progress more or less at the same speed and users can rely on the features.

Backgrounds & Borders

Some high-priority modules (1)

Multi-column Layout

Some high-priority modules (2)

Writing Modes

Some high-priority modules (3)

Non-japanese letters in vertical Japanese text can be written      both upright or sideways. The word “Mac” in this text from a magazine occurs both ways in      the same paragraph.

Text

Some high-priority modules (4)

The main reason Writing Modes and Text have high priority is electronic books. There is a standard called EPUB (not made by W3C), which is being updated to version 3 at this moment. EPUB is built on HTML and CSS. For convenient reading of electronic books all these features are needed, otherwise the experience, expecially for non-western books, would be rather less convincing than with traditional, paper books.

Fonts

Some high-priority modules (5)

The end

URL: http://www.w3.org/Talks/2011/0518-CSS-Bilbao/

W3C

To Lead the Web to its full potential

To Anticipate the Trends

To Increase your company value

Join W3C

http://www.w3.org/Consortium/join

or contact: Bernard Gidon <bgidon@w3.org>

Bert Bos <bert@w3.org>
GPG fingerprint:
7744 0204 52A5 14D9 147D
2A13 2D7A E420 184B 5BA4