YUI CSS Kicks Ass

I was looking for a color picker widget over at Yahoos YUI site. I have been there before mostly to watch the videos on Javascript. Douglas Crockford is obviously the man when it comes to Javascript.

Anyway, I saw a link for a video on YUI’s CSS component and I was just a little bit interested. I though it was probably just another CSS reset. There was some vague promise of Grids and I couldn’t imagine how they could make that easy so I still didn’t think it looked promising.

Wow was I wrong. If you haven’t seen this then you need to go check it out. Nate Koechley and crew have done a seminal piece of CSS work here. Here are the highlights:

  • They provide a reset for all styles and fonts in all major browsers, including IE6. You are leveraging all the cross browser testing done by Yahoo
  • Everything (fonts, boxes etc) is sized with em’s or percentages of em’s so the entire page will scale gracefully for 508C
  • The Grids can be nested. You can do 2, 3 or 4 columns in a variety of width ratios (e.g. 2 columns: 1/4, 3/4 )
  • Its really simple to use

At work we have struggled with CSS. We don’t have a full time web designer to work for us. So the devs do all the html & css. I’m fairly handy with this sort of thing but have no where near enough time to produce the level of product that you can get with YUI. Other devs have even less patience for this sort of thing. For us this make a whole lot of sense.

We are really sensitive to the semantic markup of the page and the use of em’s for 508C support. We want it to be nice to use not just live up to the letter of some spec. I started using em’s when we first did the style sheet but I was about to give up because it was getting so difficult to use. Now its going to be easy to provide the kind of experience and cross browser compatibility that I have wanted all along.

Just go to Yahoo’s home page and increase the font size. Look at how smoothly that works and realize how hard that is to set up. Now realize you can do that to your site and still get work done faster than before. Your developers can pick this up in an hour or two and start building better stuff.


Tags:

 
 
 

2 Responses to “YUI CSS Kicks Ass”

  1. Gravatar of Nate Koechley Nate Koechley
    21. March 2008 at 13:44

    Hey there, I’m really happy to hear that YUI’s CSS stuff is useful to you and your team. Thanks for the kind words, and please let me know if you have any feedback or questions.

    Thanks,
    Nate

    Nate Koechley
    YUI Team, Yahoo! Inc.

  2. Gravatar of Gareth Farrington Gareth Farrington
    23. March 2008 at 22:04

    Thanks for making this stuff publicly available. I’ll let you know how it goes. We use an API of some sort for almost every part of out software in some way. We currently sill do CSS 100% by hand. This is sort of like an API for CSS. I’m interested in how the grids will work out for laying out HTML forms.