SASS Vendor Prefixing

//Adds all sorts of vendor prefixes@mixin prefix($property, $value) {
  @each $prefix in -webkit-, -moz-, -ms-, -o-, '' {
    #{$prefix}#{$property}: $value;
  }
}

//I would prefer Autoprefixer over this - https://github.com/postcss/autoprefixer

Capitalize first letter of a word in JavaScript

//Using prototype here will help you chain methods to your stringString.prototype.capitalize = function() {
  return this.charAt(0).toUpperCase() + this.slice(1); 
}

Powered by WordPress :)