Skip to content

Instantly share code, notes, and snippets.

@matthewbeta
matthewbeta / resize-debounce.js
Created March 24, 2015 11:24
Resize event debounce from CSS tricks
var resizeTimer;
$(window).on('resize', function(e) {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
// Run code here, resizing has "stopped"
}, 250);
/* This */
.my-module {
background: #DDD;
&-header {
padding: 10px;
}
&-link {
color: red;
}
}
@matthewbeta
matthewbeta / parent-selector-modifiers
Created January 16, 2015 09:32
nesting parent-selector modifiers
/* instead of this */
.mobile {
.my-module {
color: red;
}
}
.desktop {
.my-module {
color: blue;
}
@matthewbeta
matthewbeta / nav.scss
Last active August 29, 2015 14:08
flexible, vertically centered navigation
$color-nav-bg: grey
$color-nav-bg-active
$stretch: -100px; // taller/wider than your links would ever need to stretch
// 1. Set the nav ul to be table
.nav-list {
display: table;
width: 100%;
}
// 2. Set the nav items to be table-cell
// more stuff
sass: {
dev: {
options: { // Target options
style: 'expanded'
},
},
prod: {
options: {
module.exports = function(grunt) {
var dev = {
deployConfiguration: grunt.file.readYAML("deployment.dev.yml"),
},
prod = {
deployConfiguration: grunt.file.readYAML("deployment.yml");
},
bucket = 'ember-build-dsh';
@matthewbeta
matthewbeta / gulpfile.js
Created September 8, 2014 11:18
example gulpfile for jekyll and sass
var gulp = require('gulp');
var gutil = require('gulp-util');
var sass = require('gulp-ruby-sass') ;
var prefix = require('gulp-autoprefixer');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var filter = require('gulp-filter');
var sourcemaps = require('gulp-sourcemaps');
var minifycss = require('gulp-minify-css');
var browserSync = require('browser-sync');
@matthewbeta
matthewbeta / Web-Safe-Fonts-#2.markdown
Created May 22, 2014 21:26
A Pen by matthew jackson.
@matthewbeta
matthewbeta / Web-Safe-fonts-#1.markdown
Created May 21, 2014 23:40
A Pen by matthew jackson.

Web Safe fonts #1

Gonna try and make some nice typographic things with websafe fonts. Started with the easiest and best

A Pen by matthew jackson on CodePen.

License.

@matthewbeta
matthewbeta / Gruntfile.js
Created February 17, 2014 09:48
Grunt Bolierplate
module.exports = function(grunt) {
// Show elapsed time after tasks run
require('time-grunt')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
});