# HG changeset patch # User Sylvain Thénault # Date 1280736569 -7200 # Node ID f0ae98fa85a1d4ec0ba5c52b3317a6b9bc1012fa # Parent 4695b1ee58a043fd4e2d703ce73974f2940d5146 [doc] started js/css coding standards diff -r 4695b1ee58a0 -r f0ae98fa85a1 doc/coding_standards_css.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/coding_standards_css.rst Mon Aug 02 10:09:29 2010 +0200 @@ -0,0 +1,33 @@ +CSS Coding Standards +-------------------- + +(Draft, to be continued) + +:Naming: camelCase + +Indentation rules +~~~~~~~~~~~~~~~~~ +- 2 espaces avant les propriétés + +- pas d'espace avant les ":", un espace après + +- 1 seul espace entre les différentes valeurs pour une même propriété + + +Documentation +~~~~~~~~~~~~~ +Please keep rules semantically linked grouped together, with a comment about +what they are for. + +Recommendation +~~~~~~~~~~~~~~ +- Try to use existing classes rather than introduce new ones + +- Keep things as simple as possible while in the framework + +- Think about later customization by application + +- Avoid introducing a new CSS file for a few lines of CSS, at least while the + framework doesn't include packing functionalities + + diff -r 4695b1ee58a0 -r f0ae98fa85a1 doc/coding_standards_js.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/coding_standards_js.rst Mon Aug 02 10:09:29 2010 +0200 @@ -0,0 +1,37 @@ +Javascript Coding Standards +--------------------------- + +(Draft, to be continued) + +:Naming: camelCase, except for CONSTANTS + +Indentation rules +~~~~~~~~~~~~~~~~~ +- espace avant accolade ouvrante + +- retour à la ligne après accolade ouvrante (éventuellement pas + de retour à la ligne s'il y a tout sur la même ligne, mais ce n'est + pas le cas ici. + +- no tabs + + +Documentation +~~~~~~~~~~~~~ +XXX explain comment format for documentation generation + + +Coding +~~~~~~ +- Don't forget 'var' before variable definition, and semi-colon (';') after **each** statement. +- Check the firebug console for deprecation warnings + + +API usage +~~~~~~~~~ +- unless intended, use jQuery('container') rather than jqNode('container') + + +See also +~~~~~~~~ +http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml \ No newline at end of file