Confirmed users
45
edits
| Line 31: | Line 31: | ||
= Coding Guidelines = | = Coding Guidelines = | ||
* Generally we use [https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style Mozilla Coding Style], with a few exceptions: | * Generally we use [https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style Mozilla Coding Style], with a few exceptions: | ||
** You don't need to wrap lines to 80 characters. Use longer lines (up to around | ** You don't need to wrap lines to 80 characters. Use longer lines (up to around 100 characters; use your judgement) if it improves readability. | ||
* Consistency is king, and supersedes any particular rule. | * Consistency is king, and supersedes any particular rule. | ||
== JS == | == JS == | ||
| Line 41: | Line 41: | ||
== CSS == | == CSS == | ||
* if you create an attribute and it has only one value, do not set it to true/false. Remove the attribute in the case of false. This produces cleaner, more concise css, without imperiling js readability. | * if you create an attribute and it has only one value, do not set it to true/false. Remove the attribute in the case of false. This produces cleaner, more concise css, without imperiling js readability. | ||
== XUL / XML == | |||
* one attribute per line | |||
* open & closing tags should go on separate lines | |||
= helpful references = | = helpful references = | ||
* yuan's list of design links: https://kippt.com/yuan/designing-for-windows-8 | * yuan's list of design links: https://kippt.com/yuan/designing-for-windows-8 | ||
* general coding guidelines for Mozilla: https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style | * general coding guidelines for Mozilla: https://developer.mozilla.org/en-US/docs/Developer_Guide/Coding_Style | ||
* general branding/identity/style/usage guide for Mozilla: https://www.mozilla.org/en-US/styleguide/ | * general branding/identity/style/usage guide for Mozilla: https://www.mozilla.org/en-US/styleguide/ | ||