The layout of a document (hence) ... the form of presentation of something. ~ Wikipedia
- Prefix feature branch names with your initials.
- Write a good commit message.
- Break long lines after 80 characters.
- Delete trailing whitespace.
- Don't include spaces after
- Don't misspell.
- If you break up an argument list, keep the arguments on their own lines and closing parenthesis on its own line.
- If you break up a hash, keep the elements on their own lines and closing curly brace on its own line.
- Indent private methods equal to public methods.
- Use 4 space indentation (no tabs).
- Use an empty line between methods.
- Use spaces around operators, after commas, after colons and semicolons, around
- Use Unix-style line endings (
- Use uppercase for SQL key words and lowercase for SQL identifiers.
- Avoid abbreviations.
- Avoid types in names (
- Name variables, methods, and classes to reveal intent.
- Treat acronyms as words in names (
XMLHTTPRequest), even if the acronym is the entire name (
- Order methods so that caller methods are earlier in the file than the methods they call.
- Order methods so that methods are as close as possible to other methods they call.
- Use the LESS syntax.
- Use hyphens when naming mixins, extends, classes & variables:
- Use space between property and value:
- Use a blank line above selector that has styles.
- Prefer hex color codes
//for comment blocks not
- Use a space between selector and
- Use single quotation marks for attribute selectors and property values.
- Use only lowercase, including colors.
- Don't add a unit specification after
0values, unless required by a mixin.
- Don't use ID's for style.
- Use meaningful names:
- Use ID and class names that are as short as possible but as long as necessary.
- Append the prefix
- Avoid using the direct descendant selector
- Avoid nesting more than 4 selectors deep.
- Don't nest more than 6 selectors deep.
- Avoid using the HTML tag in the class name:
- Avoid using HTML tags on classes with specific class names like
- Avoid using comma delimited selectors.
- Avoid nesting within a media query.
- Use Normalize as a browser reset.
- Use HTML5 Boilerplate as your guide to HTML5 best practices.
- Prefer Foundation by Zurb as the base layout, then override with custom styles later
- Use ASCII text.
- Use ISO-8859-1 or UTF-8 character encoding. The encoding may be declared using declare(encoding = 'utf-8'); at the top of the file.
- Use Unix formatting. "Unix formatted" means lines must end only with a line feed (LF). Line feeds are represented as ordinal 10, octal 012 and hex 0A. Do not use carriage returns (CR) like Macintosh computers do or the carriage return/line feed combination (CRLF) like Windows computers do.