Ajax Bestiary: A Javascript Field Guide
 
Ajax Bestiary: A Javascript Field Guide
 
 

Entries Tagged as 'Article'

Choosing Between YUI CSS & Blueprint

Posted by Don Albrecht
There are two extremely powerful CSS frameworks available to web developers at this time: blueprint & yui css. Both provide a basic css reset, simplified font formating & powerful layout tools. It is the layout tools that will most influence your decision as to which framework makes sense for your project.

Blueprint is based on a strict layout grid. All objects are defined in terms of 14 columns that define a 950px wide layout. Complex layouts can be defined by carefully constructing columns & collections of columns. There is no limit to recursive depth, however no column can be less than 70 pixels wide and all columns are a multiple of 70 pixels. This ensures that everything on the page lines up cleanly.

YUI uses a more flexible template & divider route. All YUI layouts begin as a document with a predefined width ( 750px, 950px, 974px, 100% or a custom width). A single sidebar can then be added to the left or right in a predefined width ( 160px, 180px, 240px, 300 px). Lastly, the body can be recursively divided using grid tools into thirds, quarters & halves.

So, which one should you use?

Use YUI if you need a layout in a dimension other than 950px or if your layout requires division by thirds or quarters across the entire width.

Don’t use YUI if you need to create objects that are a width other than 2/3, 1/3, 1/2, 1/4 or 3/4 of their container e.g. (5/6, 7/8) or if you need more precise control of dimensions.

Use Blueprint if you need fine grained control & precise positioning in a standard 950px layout. Generally, Blueprint based layouts are much more manageable over the long run & easier to code. Unfortunately they have higher bandwidth consumption & fewer options than a YUI layout.