This is how I handle my code comments, there are 2 types:
- Section header (with optional additional comment(s))
- Regular comment(s)
All comments are limited to 80 characters per line with padding on each horizontal side consisting of two spaces.
This is how I handle my code comments, there are 2 types:
All comments are limited to 80 characters per line with padding on each horizontal side consisting of two spaces.
var data = [ | |
{ | |
id: 1, | |
name: 'One', | |
image: 'http://image-1.jpg' | |
}, | |
{ | |
id: 2, | |
name: 'Two', | |
image: 'http://image-2.jpg' |
/** | |
`classList` pollyfill: | |
https://github.com/remy/polyfills/blob/master/classList.js | |
*/ | |
!function(){function e(a){this.el=a;for(var c=a.className.replace(/^\s+|\s+$/g,"").split(/\s+/),d=0;d<c.length;d++)b.call(this,c[d])}function f(a,b,c){Object.defineProperty?Object.defineProperty(a,b,{get:c}):a.__defineGetter__(b,c)}if(!("undefined"==typeof window.Element||"classList"in document.documentElement)){var a=Array.prototype,b=a.push,c=a.splice,d=a.join;e.prototype={add:function(a){this.contains(a)||(b.call(this,a),this.el.className=this.toString())},contains:function(a){return-1!=this.el.className.indexOf(a)},item:function(a){return this[a]||null},remove:function(a){if(this.contains(a)){for(var b=0;b<this.length&&this[b]!=a;b++);c.call(this,b,1),this.el.className=this.toString()}},toString:function(){return d.call(this," ")},toggle:function(a){return this.contains(a)?this.remove(a):this.add(a),this.contains(a)}},window.DOMTokenList=e,f(Element.prototype,"classList",function(){return new e(this)})}}(); | |
/** |
<ul class="instagram__items"></ul> |
.grid { | |
margin-left:-24px; | |
list-style:none; | |
margin-bottom:0; | |
} | |
.grid__item { | |
display:inline-block; | |
width:50%; | |
padding-left:24px; |
(function ($, window, document, undefined) { 'use strict'; $(function () { | |
// | |
}); })(jQuery, window, document); |
.slideshow { | |
margin-bottom:20px; | |
position:relative; | |
} | |
.slideshow__item { | |
width:100%; | |
} | |
.slideshow__item + .slideshow__item { |
<form class="contact-form" method="post" action=""> | |
<ul class="form-fields"> | |
<li> | |
<label>Your Name</label> | |
<input class="text-input" type="text" name="name" required value="TEST NAME"> | |
</li> | |
<li> | |
<label>Your Email</label> | |
<input class="text-input" type="email" name="email" required value="email@email.com"> | |
</li> |