Search

3/03/2009

Nicole Sullivan’s Object Oriented CSS

Nicole Sullivan’s Object Oriented CSS


http://wiki.github.com/stubbornella/oocss
Two main principles
1. Separate structure and skin
2. Separate container and content

10 Best Practices
1. create a component library
2. Use consistent semantic styles
3. Design module to be transparent on the inside
4. Be flexible
5. Learn to love grids.
6. Minimize selectors.
7. Separate structure and skin.
8. Separate container and content.
9. Extent Objects by applying multiple classes on an element.
10. Use reset and fonts from YUI

9 Pitfalls
1. Location dependent styles.
2. Avoid specifying what tag a class applies
3. Avoid IDs to style inside the main content areas.
4. Avoid drop shadows and rounded corners over irregular backgrounds
5. Don't sprite every image together (unless you has very few pages)
6. Avoid height alignment.
7. Text as text, not as images.
8. Redundacy
9. Avoid premature optimiaztion

沒有留言: