Nicole Sullivan’s Object Oriented CSShttp://wiki.github.com/stubbornella/oocssTwo main principles1. Separate structure and skin2. Separate container and content10 Best Practices1. create a component library2. Use consistent semantic styles3. Design module to be transparent on the inside4. Be flexible5. 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 YUI9 Pitfalls1. Location dependent styles.2. Avoid specifying what tag a class applies3. Avoid IDs to style inside the main content areas.4. Avoid drop shadows and rounded corners over irregular backgrounds5. Don't sprite every image together (unless you has very few pages)6. Avoid height alignment.7. Text as text, not as images.8. Redundacy9. Avoid premature optimiaztion
張貼留言
沒有留言:
張貼留言