Home

Awesome

Coding Style Guidelines

HTML, CSS, JavaScript, Jade & Stylus guidelines.

HTML

<div class="foo">
  <ul>
    <li>Foo
    <li>Bar
    <li>Baz
  </ul>
</div>

CSS

.foo,
.bar,
.baz {
  font-size: 1em;
  color: #369;
}
.org-Block
.org-Block--modifier
.org-Block-element
.org-Block-element--modifier
.js-ListenerAction

JavaScript

function each(fn, context){
  var array = this
    , index = -1
    , length = array.length

  while(++index < length) {
    fn.call(context, array[index], index, array)
  }

  return array
}
function Hash(object){
  var hash = this
    , length
 
  if(!(array instanceof Hash)) {
    return new Hash(object)
  }
  extend(array, object, true)
  length = object.length
  if(object) {
    array.length = length
  }
}
;(function(window, document){
  // code here
})(this, this.document)

Jade

doctype html
html
  head
    meta(charset="utf-8")
    title Foo
  body
    h1 Hello

Stylus

.foo
.bar
.baz 
  @extend .foo
  font-size: 1em
  color: #369