What you should know about CSS 2.1

By | | JavaScript & CSS

3

CSS 2 revision 1 has been out as a candidate recommendation for nearly two months now, but there’s been surprisingly little discussion of it around the web. It’s an interesting specification, and one that any standards conscious web developer should be aware of.

CSS 2.1 revises CSS 2 to better reflect the current state of the browser market, and to build upon lessons learnt in the four years since CSS 2 was released. It trims out a number of features that were never really adopted by the overall CSS community, such as aural stylesheets (now relegated to an Appendix) and adds a small number of widely requested or implemented features, such as the colour keyword ‘orange’.

The best guide to what’s new in CSS 2.1 can be found in the specification itself in the CSS 2.1 vs CSS 2 section. While most of the differences are subtle, the end result is a significant improvement over CSS 2 and forms a much better foundation for CSS going forward.

Written By:

Simon Willison

Simon is a seasoned Web developer from the UK, currently working in Lawrence, Kansas. He specializes in both client- and server-side development, and recently became a member of the Web Standards project. Visit him at http://simon.incutio.com/, and at Stylish Scripting: SitePoint's DHTML and CSS Blog.

Website
>> More Posts By Simon Willison

 

{ 3 comments }

xhtmlcoder April 26, 2004 at 5:58 am

Now with added CSS Orange; I’ve been following CSS 2.1 progress since 2002 mainly for the errata aspects.

liorean April 24, 2004 at 12:13 am

Well, there is at least one really large change that is worth to mention IMHO, and that is the behavior of the box model relating to floats. It’s been revised, so now it is possible to use the floats without assigning an explicit width and have them size to the content (auto, the default value for width, evaluated to 0 in CSS2.0). This fix is one that really have an impact on how you can use floats without having a fixed width container, instead relying on contents for sizing. (Also note that most browsers already behaved the CSS2.1 way, except for op7 and moz in some rather special occasions where other properties and conditions play a part.)

Kevin Yank April 23, 2004 at 1:55 am

See also my editorial in the Tech Times #84 on this subject.

Comments on this entry are closed.