Skip to content

Latest commit

 

History

History
68 lines (53 loc) · 1.21 KB

style_guide.md

File metadata and controls

68 lines (53 loc) · 1.21 KB
title permalink
Style Guide
/style_guide

Since it is fairly rare these days for a developer to always work alone, as a team we need to follow a style guide. No, this has nothing to do with your CSS, this is how we are going to structure your code so that it is easily readable.

Things to follow:

Indention

HTML

Good:

<div>
  <h1>Hello</h1>
  <p>
    Lots of words. Lots of words. Lots of words. Lots
    of words. Lots of words. Lots of words. Lots of
    words. Lots of words. Lots of words.
  </p>
  <ul>
    <li>Short</li>
    <li>
      Lots of words. Lots of words. Lots of words. Lots
      of words. Lots of words. Lots of words.
      </li>
  </ul>
</div>

Bad:

<div>
<h1>Hello</h1>
<p> Lots of words. Lots of words. Lots of words. Lots of words. Lots of words. Lots of words. Lots of words. Lots of words. Lots of words.  </p>
<ul>
  <li>Short</li>
  <li> Lots of words. Lots of words. Lots of words. Lots of words. Lots of words. Lots of words.  </li>
</ul>
</div>

CSS

Good:

.main {
  background-color: #eeeeee;
}

Javascript

Good:

function hello() {
  var greeting = 'Hello CoderGirl!';
  console.log(greeting);
}

Home