Best Practices

  • Add CSS through external files, minimizing the # of files, if possible. It should always be in the HEAD of the document
  • Use the LINK tag to include, never the @import
  • Never use inline styles in the document, either in a style tag or on the elements. It's harder to track down style rules or override them
  • Do not use presentational class names such as 'green'.
  • Colors should be hex values using shorthand when possible unless you are declaring a transparent background, in this case use rgba()
  • Nothing is ever that !important, there can be exceptions to this rule but it's rare.