]>
Commit | Line | Data |
---|---|---|
457df43b | 1 | # Contributing |
d0bfb193 | 2 | |
457df43b | 3 | ## Branches and issues |
d0bfb193 EK |
4 | - Whenever possible, one commit per feature. |
5 | - If feature/pull-request branches have only one developer, please regularly | |
6 | rebase them onto master until they are merged in. | |
7 | - Don't merge branches with meaningless commit messages; always squash them | |
8 | instead. | |
9 | - Wait for discussion of big changes. Your branches will still be here | |
10 | tomorrow. | |
457df43b SB |
11 | |
12 | ## Coding Style | |
13 | - Use lowercase filenames | |
14 | - Do not use underscores in filenames | |
15 | ||
16 | Take note about the following fileextensions is preferred over their alternatives: `.md`, `.html`, `.jpg` | |
17 | ||
18 | ### MARKDOWN - editorial content | |
19 | - Use Brittish English | |
20 | ||
21 | ### CSS | |
22 | - Four spaces as indentation | |
23 | - Opening curly bracket on the same line as the selector | |
24 | - One selector per line, if multiple selectors are grouped then commas + newline is used | |
25 | - One space between selector and opening curly brackets | |
26 | - Closing curly bracket should be placed on its own line with one empty line after | |
27 | - Rules containing only one Declaration can be put on one single line, a space is required after `{` and before `}` | |
28 | - Comments | |
29 | - One line comments (`/* ... */`) should have a space after the opening `/*` and a space before the closing `*/` | |
30 | - Multi line comments should have the closing `*/` on an own line, | |
31 | text are allowed on the same row as the opening `/*`. | |
32 | Note that there must be a space after the opening `/*`. | |
33 | One asterix per line, aligned with the ones in the opening and closing `/*` and `*/`, with one space after the asterix | |
34 | - Abbrevations are allowed if they are explained in a comment just before their first appearance. Format: `/* <abbrevation> = <expanded abbrevation> [(optional comment)] */ | |
35 | - All variables should be declared in `:root {}` | |
36 | - All custom media should be declared directly after `:root {}` | |
37 | - Reuse variables rather than creating new ones, if possible. (this is to keep a condensed palette) | |
38 | - All colors must be variables, no colors are declared after `:root { }` | |
39 | ||
40 | This does not apply to third party css such as open sans, font awesome and freenode.css | |
41 | ||
42 | ### HTML | |
43 | - Templates are [Jinja2](http://jinja.pocoo.org) based | |
44 | - Four spaces as indentation | |
45 | - No direct internal links, use `{{ url_for("") }}` | |
46 | - External links should include protocol, https is a must if the site linked to supports it, `target="_blank"` is preferred | |
47 | - Comments should only be template comments, `{#- ... #}` instead of `<!-- ... -->` | |
48 | - If there are a newline in an element the opening and closing tags should be on it's own lines (expanded elements) | |
49 | - One line elements (collapsed elements) preferably shouldn't be any longer than 80 characters. | |
50 | - Use lowercase element names and attributes | |
51 | - All elements should be closed, including empty elements such as `<meta content="" />` and `<br />` | |
52 | - Quote attribute values with double quotes. (use single quotes if the attribute value contains a double quote) | |
53 | - No inline styles are allowed | |
54 | - No spaces around `=` | |
55 | ||
56 | A *.footerchild* should contain at least 3 items, it just look silly otherwise. |