Looking to contribute something to soundtrack.io? Here's how you can help.
master
is the latest, deployed version.
- Try not to pollute your pull request with unintended changes--keep them simple and small
- Two spaces for indentation, never tabs
- Double quotes only, never single quotes
- Always use proper indentation
- Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags)
- Adhere to the Recess CSS property order
- Multiple-line approach (one property and value per line)
- Always a space after a property's colon (.e.g,
display: block;
and notdisplay:block;
) - End all lines with a semi-colon
- For multiple, comma-separated selectors, place each selector on it's own line
- Attribute selectors, like
input[type="text"]
should always wrap the attribute's value in double quotes, for consistency and safety (see this blog post on unquoted attribute values that can lead to XSS attacks).
- Always semicolons/
- Comma first syntax when > 3 array elements. See below about preferring legibility.
- 2 spaces (no tabs)
- Legible code above all
- Use spaces between operators where it improves legibility.
- Use linebreaks where code is separated into logical components.
- Be respectful of other devs' sanity:
- Use comments to describe non-intuitive code.
- If you leave a log event behind, make it meaningful. No "wat lol" log events.