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
function server() { | |
local port="${1:-8000}" | |
open "http://localhost:${port}/" | |
python -m SimpleHTTPServer "$port" | |
} | |
# grunt | |
function gi() { | |
npm install --save-dev grunt-"$@" | |
} |
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
Running "suitcss:component" (suitcss) task | |
component-resolver remote not set - defaulting to remotes's defaults +0ms | |
component-resolver:locals resolving local at "/Users/simonsmith/Sites/grunt-suitcss/test/fixtures/component" +0ms | |
component-resolver resolving "component-test" +5ms | |
component-resolver:dependencies resolving dependency suitcss/suit@0.4.0 +0ms | |
component-resolver:dependencies searching ["local","github","bitbucket"] for suitcss/suit@0.4.0 +0ms | |
component-resolver remaining dependencies: 1 +6ms | |
component-resolver remaining semver: 0 +0ms | |
component-resolver finished resolving locals +0ms | |
component-resolver:dependencies found suitcss/suit@0.4.0 from remote "local" +3ms |
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
(function(context) { | |
var factories = {}, loaded = {}; | |
var isArray = Array.isArray || function(obj) { | |
return obj.constructor == Array; | |
}; | |
var map = Array.map || function(arr, fn, scope) { | |
for (var i = 0, len = arr.length, result = []; i < len; i++) { | |
result.push(fn.call(scope, arr[i])); | |
} |
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
/** | |
* Add matchers for different types | |
* Note that Function.prototype.bind is not supported in PhantomJS | |
* Uses underscore/lodash | |
* | |
* Usage: expect('test').toBeString(); | |
*/ | |
!function() { | |
'use strict'; |
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
Function.prototype.bind = (function() { | |
}).bind || function(b) { | |
if (typeof this !== "function") { | |
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); | |
} | |
function c() { | |
} | |
var a = [].slice, f = a.call(arguments, 1), e = this, d = function() { | |
return e.apply(this instanceof c ? this : b || window, f.concat(a.call(arguments))); |
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
/** | |
* Spacing utilities | |
* | |
* Used to override styles on components without need for | |
* additional modifier classes | |
* | |
* Usage: | |
* <div class="u-mbZ"> // margin-bottom: 0 | |
* <div class="u-mt20"> // margin-top: 20px | |
* <div class="u-m25"> // margin: 25px |
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
module.exports = withFeatureDetect; | |
function withFeatureDetect() { | |
'use strict'; | |
this.addFeatureDetectClass = function(feature, supported) { | |
var prefix = (supported ? 'is-' : 'is-not-'); | |
this.$node.addClass(prefix + feature + '-enabled'); | |
}; |
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'); | |
var bemLinter = require('postcss-bem-linter'); | |
var atImport = require('postcss-import'); | |
var cssnext = require('cssnext'); | |
var postcss = require('gulp-postcss'); | |
var concat = require('gulp-concat'); | |
var notify = require('gulp-notify'); | |
var stylus = require('gulp-stylus'); | |
gulp.task('css', function() { |
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
.center-container { | |
text-align: center; | |
&:before { | |
content: ''; | |
display: inline-block; | |
height: 100%; | |
vertical-align: middle; | |
margin-right: -0.25em; | |
} |
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
.outer(@outer) when (@outer > 0) { | |
(~".outer@{outer}") { | |
color: red; | |
.inner(@inner) when (@inner > 0) { | |
font-size: @inner; | |
.inner(@inner - 1); | |
} | |
.inner(0) {} | |
.inner(@outer); | |
} |
OlderNewer