This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* A little mixin to make CSS gradient borders easy peasy. | |
* Just feed it two colors, a width and direction. | |
* TODO: support 3+ color stops, more options | |
* | |
* A look at the mixin in action: http://codepen.io/EliFitch/pen/dorXeB | |
* usage: @include gradient-border($green, $blue, 3px, 'to left') | |
* | |
* Authored by Eli Fitch (https://github.com/elifitch) | |
* Found at https://gist.github.com/elifitch/67ae7cfe1594abf8fb57 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var c = document.createElement('canvas'); | |
c.height = window.innerHeight; | |
c.width = window.innerWidth; | |
var ctx = c.getContext('2d'); | |
function blocks(size) { | |
//draw row | |
for(var j=0, x=c.height/size; j<x; j++) { | |
//draw block | |
for(var i = 0, l = c.width/size; i<l; i++) { |