Skip to content

Latest commit

 

History

History
63 lines (54 loc) · 1.25 KB

CONTRIBUTE.md

File metadata and controls

63 lines (54 loc) · 1.25 KB

Code Style

  • Four space indentation
  • Remove trailing whitespaces and add an empty line at the end of each file
  • IE 9+ Compatibility

PHP

  • include templates, not require or _once
  • Use full PHP tags, not short ones
  • Don't close PHP tags on PHP only files
  • Correctly format assignments for readability
<?php
    include '_templates/sitewide.php';
    $page['title'] = 'HTML Safe Title';
    include '_templates/header.php';
    
    $foo        = bar($para, $param);
    $second_foo = 42;
    $third_foo  = 'hey';
?>

HTML

  • Include alt attribute for all images
  • Include title attribute for all links
  • Close all your tags properly

CSS

  • Try to use classes instead of IDs unless things are absolutely unique
  • One selector per line
  • Care with fallbacks and browsers compatibilities
.class {
    color: #fefe89;
    font-size: 1.1em;
}

.second-class,
.third-class {
    backgound-color: white;
}

Contributing

Make a new branch and push it to GitHub.

git checkout -b feature_branch_name
git push -u origin feature_branch_name

Updating from Master

git pull origin master

Merge from master

git checkout feature_branch_name
git merge master

Fix Merge Conflicts

TODO