Blog Post RSS ?

Blogs » JavaScript & CSS » What you should know about CSS 2.1
 

What you should know about CSS 2.1

by Simon Willison

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.

If you liked this blog, share the love:

  • Save to Del.icio.us

This post has 3 responses so far

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

     
  2. 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.)

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

     

Sponsored Links

Leave a response

You are not logged in, log in with your SitePoint Forum username and password.

-OR- Post Anonymously

* Make sure any code samples are escaped (i.e. ‘<b>’ becomes ‘&lt;b&gt;’).

If not logged in, your comments will be placed in a moderation queue. This means your comment may not appear until one of our moderators approves it.

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Logo Design, Web page Design and more!

99designs

  • Custom logo designs created ‘just for you’.
  • Pick the design you like best.
  • Only pay if you’re satisfied with the result.

The Web Site Revenue Maximizer

New Release

Free PDF Download:

101 Ways To Make Money From Your Website!

Free eBook! Firefox Revealed