- use lowercase and separate words with hyphens when naming selectors. Avoid camelcase and underscores.
- Use human readable selectors that describe what element(s) they style.
- Attribute selectors, use double quotes around values
- Refrain from using over-qualified selectors, div.container can simply be stated as .container
- Properties followed by a colon and a space.Code all properties and values in lowercase, except for font names and vendor-specific properties.
- Use hex code for colors, or rgba() if opacity is needed. Try to avoid RGB format and uppercase, and shorten values when possible: #fff instead of #FFFFFF.
- Use shorthand (except when overriding styles) for background, border, font, list-style, margin, and padding values as much as possible. (For a shorthand reference, see CSS Shorthand.)
- Space before the value, after the colon
- Do not pad parentheses with spaces
- Always end in a semicolon
- Use double quotes rather than single quotes, and only when needed, such as when a font name has a space.
- Define font weights using numeric values (e.g. 400 instead of normal, 700 rather than bold).