HTML5 Zone is brought to you in partnership with:

John Esposito edits Refcardz at DZone, while writing a dissertation on ancient Greek philosophy and raising two cats. In a previous life he was a database developer and network administrator. John is a DZone Zone Leader and has posted 333 posts at DZone. You can read more from them at their website. View Full User Profile

Lea Verou on CSS3 and Where It's Going

11.02.2011
| 2237 views |
  • submit to reddit

Sometimes CSS3 is cool, sometimes practical -- best when it's both.

Actually, that 'practical' link is pretty cool too -- and no surprise, since its author is Lea Verou, famous guru and evangelist of CSS awesome.

Recently she addressed the problem of divergent browser implementations of CSS -- an old problem, still not fully solved -- with a JavaScript preprocessor that detects the user's browser and adds the appropriate prefixes to CSS properties everywhere on the page. Basically this means that CSS developers don't need to worry about browser implementation (at least for most modern browsers).

Some developers objected to Lea's use of JavaScript to fix this kind of problem. (For one thing, it's not 'pure CSS'.)

In yesterday's interview with Chris Coyier of css-tricks.com, Lea answers these objections, defends SVG (it's much more powerful, even if more difficult than pure CSS) and talks about the future of CSS.

As a teaser, here's what she had to say about attr():

My favorite CSS3 feature that doesn't have enough implementations yet is the CSS3 generalization of attr(). In CSS2.1, we can use attr() in the content property, to use attribute values in generated content. In CSS3, we're supposed to be able to use attr() in every property, which will greatly reduce presentational JavaScript code. Unfortunately, only IE9 supports it, and not fully. If only developers realized how many use cases it simplifies and started pushing browser vendors for it!

An interesting favorite choice, to be sure.

Read the full interview for much more.

Tags: