Hacker News new | past | comments | ask | show | jobs | submit login

Can someone explain what a CSS framework is, and why I might want to use one?



That sort of depends, but for the most part CSS frameworks can provide:

- Sensible defaults for sizing and other attributes that tend to differ across browsers, including typography and such (see Y! CSS Reset)

- Helper classes for forms, info boxes, so on (see Blueprint's forms.css)

- Grid-based layouts to cut down on dev time (see Y! Grids)

Basically, they attempt to cut down on CSS development time by making things equivalent across browsers as well as providing many common styles you would have made anyway. Some also provide various grid-based layouts and others go beyond these things to provide even more, effectively creating something that truly is a framework (I prefer to think of most of them as CSS libraries).


A CSS framework are a collection of files that provide defaults for you to customize or build upon when your writing your stylesheets. Whether its typography or page layout widths or grids/columns, the main point of a framework is to cut down on development time by providing you a base that you can build upon and customize.

I can't say for sure why you may want to use one, that really depends on the project at hand. One argument can be that you can just run with it without having to define and test your own styles. Also, a framework can eliminate a lot of cross browser issues that may arise and give you consistency across a wide range of browsers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: