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
// global constructor | |
Promise | |
.all( iterable ) | |
.race( iterable ) | |
.reject( r) | |
.resolve( x ) | |
.prototype | |
.catch( onRejected ) | |
.then( onFulfilled, onRejected ) |
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
// global constructor | |
Promise | |
.all( iterable ) | |
.race( iterable ) | |
.reject( r) | |
.resolve( x ) | |
.prototype | |
.catch( onRejected ) | |
.then( onFulfilled, onRejected ) |
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
// http://people.mozilla.org/~jorendorff/es6-draft.html | |
Promise | |
.all( iterable ) | |
.race( iterable ) | |
.reject( r ) | |
.resolve( x ) | |
.prototype | |
.catch( onRejected ) | |
.then( onFulfilled, onRejected ) |
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 autoprefixer = require('autoprefixer'); | |
var css = autoprefixer.process('.elem { display: flex }').css; | |
console.log(css); | |
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 autoprefixer = require('autoprefixer'); | |
// Quickly testing the API of the Autoprefixer npm package | |
document.body.textContent = autoprefixer.process('.elem { display: flex }').css; | |
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
body{cursor:default}li,p,ul{margin:0;padding:0}table{border-spacing:0;border-collapse:collapse;margin-top:1em;white-space:nowrap}td,th{border:1px solid #bbb;padding:.5em}#head-bar{overflow:auto}#menu{float:left;padding-left:.6em}#menu li{display:inline}#menu li:not(:last-child)::after{content:" | "}#menu li.selected{font-weight:700}#log-count{float:right;padding:0 .2em;color:red;font-weight:700}#content li{display:none}#dropzone{height:100px;background-color:#eee}#payments{display:none}#allData{position:relative}.inactive{background-color:#fee}.active{background-color:#efe}#metadata{position:absolute;top:0;right:0}#log{display:none;position:fixed;bottom:0;height:20em;left:0;right:0;padding:.2em;overflow-y:scroll;background-color:#000;color:#fff;font-size:12px;font-family:Consolas,monospace}#log p{margin:.2em} |
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
/* | |
* Tab Atkins's color parsing API proposal | |
* Source: http://www.w3.org/blog/CSS/2014/07/10/minutes-telecon-219/ | |
*/ | |
var color; | |
// creating color objects from RGBA components | |
color = RGBAColor(50, 100, 150, .5); | |
color = RGBAColor({ r: 50, g: 100, b: 150, a: .5 }); |
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
// Old API | |
screen.orientation | |
.lockOrientation( orientations ) | |
.unlockOrientation() | |
screen.addEventListener('orientationchange', handler) | |
// New API |
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 gulp = require('gulp'); | |
// server | |
var server = require('gulp-express'); | |
var livereload = require('gulp-livereload'); | |
// css | |
var stylus = require('gulp-stylus'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var minify = require('gulp-minify-css'); | |
// js | |
var browserify = require('gulp-browserify'); |
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 $ = jQuery; | |
// Config = selectors for UL (tabs) and SECTION (panel) elements + which tab should be selected on init | |
var $list = $('.topbar__tabs'); | |
var $sections = $('.tabbed-section'); | |
var selected_index = 1; | |
// Caching the LI and A elements since they’ll be heavily used in the code |