Coding conventions and guide lines - martindubenet/wed-dev-design GitHub Wiki
Syntax
18F is an office within the General Services Administration (GSA) that collaborates with other agencies to fix technical problems, build products, and improve how (United States) government serves the public through technology. This office publish a very useful and reliable guidelines for "front end" design and development.
Indentation: Tabs VS Spaces dilemma
I recommended using everything in the above link EXCEPT for the 2 spaces indentation. I prefer setting my indentation preferences to 1 tab character equivalent to 4 spaces but, this is a personal preference that I apply when I'm creating a new project.
It is MANDATORY to follow whatever preference the lead of a project goes for. Otherwise every time you edit and commit a file you will generate pollution in source control logs, applying change on every lines even if you editing only one of then.
Validation tools
- W3C markup validation : https://validator.w3.org/
- W3C CSS validation : https://jigsaw.w3.org/css-validator/
- Web Design Group (WDG) CSS validation : http://www.htmlhelp.com/tools/csscheck/
- WCAG accessibility guidelines validation : http://achecker.ca/checker/index.php
- Bootstrap markup validation : http://www.bootlint.com/
- Wordpress theme validation : https://developer.wordpress.org/themes/advanced-topics/validating-your-theme/
DRY (Don't Repeat Yourself) and DIE (Duplication Is Evil)
Principles:
- Repetitions within process highlights the need for automatisation.
- Repetitions within logics hilights the need for abstraction (based on semantic analysis).
- Repetitions within values highlights the need for structured datas.