Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Cannot retrieve contributors at this time
CSS Style Guide
- Use UTF-8 encoding.
- Indents are four spaces.
- Lines with nothing on them should have no whitespace.
- There should be no whitespace at the end of a line.
- class names and ids are lowercase and separated by hypens.
- No units for 0 values.
- Property name colon is always followed by a space.
- Separate all selectors and declarations by new lines.
- Property value pairs always ended with semicolon.
- Opening curly braces are on the same line as the selector.
- Do not use quotation marks with url().
/* NO: */
/* YES: */
- Be suspicious of shorthand as it clobbers by default.
- Avoid ID selectors, as they complicate specificity and hinder reuse.
- Avoid element selectors as they tightly couple CSS to document structure.
- Avoid LESS syntax except for global level colour variables.
- Do not use mixins except for cross-browser vendor prefixing.
- Do not use nested rules.
- Do not use functions and operations.
Press h to open a hovercard with more details.