Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.62 KB

File metadata and controls

44 lines (31 loc) · 1.62 KB

CodeCatz Coding Style Guide

First read why coding style matters.

Examples of other good coding styles and best practices:

General formatting rules

Indentation

  • We use tabs to indent code. Indent by one tab at the time.

Capitalization

  • Use lowercase, e.g. <table> in HTML, #cccccc for colors in css

Trailing whitespace

Newline at the end of a file

  • Always add a newline at the end of any file you edit. Why, you ask?

Naming

HTML

  • Always close tags.
  • Tables shouldn't be used for page layout.
  • Always use quotes around attributes in a tag.
    <p class="headline" data-attribute="106">This is my paragraph of special text.</p>

CSS

  • Indent CSS code.
  • Don’t use inline css.
  • Never edit framework css files (e.g. bootstrap). Override styles in your custom css file.

JavaScript

  • Always use semicolons.

Python

  • unless specifically mentioned otherwise, we basically follow the Style Guide for Python Code
  • when importing from the same module, it's ok to use the following syntax
    from module import class, another, many