Skip to content

Instantly share code, notes, and snippets.

View jhonnymoreira's full-sized avatar

Jhonny Moreira jhonnymoreira

View GitHub Profile
@jhonnymoreira
jhonnymoreira / pad.scss
Last active August 29, 2015 14:19
Simple Sass mixing to add shorthand (and specific) padding while converting units to 'rem' with the Bourbon function rem().
@mixin pad($paddings, $shorthand: true) {
$orientations: top right bottom left;
@if $shorthand {
@each $value in $paddings {
$paddings: set-nth($paddings, index($paddings, $value), rem($value));
}
padding: $paddings;
} @else {
@for $i from 1 through length($paddings) {
@jhonnymoreira
jhonnymoreira / pad.styl
Last active August 29, 2015 14:17
Simple Stylus mixing to add shorthand (and specific) padding while converting units to 'rem' with the Kouto Swiss function rem().
pad(args, shorthand = true)
positions = top right bottom left
if shorthand
for i in (0..length(args) - 1)
args[i] = rem(args[i])
padding: args
else
for i in (0..length(args) - 1)
if args[i] != 'x'
@jhonnymoreira
jhonnymoreira / gulpfile.js
Created March 12, 2015 23:05
Gulp with Stylus, Kouto Swiss, Jeet and BrowserSync
var gulp = require('gulp');
var stylus = require('gulp-stylus');
var browserSync = require('browser-sync');
var koutoSwiss = require('kouto-swiss');
var jeet = require('jeet');
var reload = browserSync.reload;
var paths = {
stylusEntry: ["./stylus/main.styl"],
stylusAll: ["./stylus/*.styl"]