A Pen by John Hunter on CodePen.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>How browsers set vertical spacing</title> | |
<style> | |
body { | |
margin: 20px; | |
font-family: Times,'Times new roman'; | |
font-size: 16px; |
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
// Allow mixins that share common properties in a single css rule | |
// store autogenerated selectors that map | |
$Placeholder-Selectors: (); | |
@mixin button($color, $extend: true) { | |
@include button-static($extend); | |
background-color: $color; | |
border-color: mix(black, $color, 25%); |
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
/* | |
createQueue - ease the pain of nested callbacks on animation | |
*/ | |
function createQueue (stepCallback) { | |
var queue = []; | |
var isPaused; | |
var totalSteps = 0; |
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
https://github.com/joyent/node/blob/master/deps/uv/include/uv.h#L63 |
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
/* jshint node:true, es3:false */ | |
// we need some complex maths functions :) | |
var maths = require('./maths'); | |
console.log(maths.XplusY(2, 4)); | |
console.log(maths.XtimesY(2, 4)); |
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
/* | |
From Doug Crockford's talk 'Monads and Gonads' | |
*/ | |
/* | |
Doug calls this a Macroid - a JavaScript version of a macro. | |
Its purpose is to create the monad unit function for a specific monad type | |
*/ | |
function MONAD (){ |
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
/* jshint node: true */ | |
module.exports = function(grunt) { | |
grunt.registerTask('default', ['concat:test']); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
concat: { |
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
/** | |
* Chat view panel | |
*/ | |
body { | |
font: 13px/1 Arial,Helvetica,sans-serif; | |
} | |
.view { | |
position: fixed; | |
bottom: 0px; |
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
/** | |
* Throbbing glow effect | |
*/ | |
body { | |
background: #fff; | |
} | |
@-webkit-keyframes throb { | |
from { box-shadow: 0 0 20px #6cf; } | |
50% { box-shadow: 0 0 00px #6cf; } |