Skip to content

Instantly share code, notes, and snippets.

@erikjung
erikjung / reset-utils.css
Created December 22, 2015 17:22
Utility classes to force style inheritance
/** @define utilities */
/**
* Inherit box-related properties.
*/
.u-inheritBox {
box-sizing: inherit;
border: inherit;
background: inherit;
function numeronymize (input) {
let chars = input.split('')
let first = chars.shift()
let last = chars.pop()
return (first + chars.length + last).toLowerCase()
}
@erikjung
erikjung / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@erikjung
erikjung / dabblet.css
Created February 11, 2014 18:01
Untitled
* {
margin: 0;
}
html {
font-size: 13px;
font-family: sans-serif;
}
body {
@erikjung
erikjung / dabblet.css
Created June 5, 2013 18:02
Mucking around with SVG and CSS
/**
* Mucking around with SVG and CSS
*/
.bubble {
}
#gradient stop:nth-child(1) {
@erikjung
erikjung / dabblet.css
Created May 1, 2013 05:59
Animation End Event
/**
* Animation End Event
*/
@keyframes remove {
from {
scale(1, 1);
}
to {
scale(0, 0);
@erikjung
erikjung / dabblet.css
Created May 1, 2013 05:36 — forked from oli/dabblet.css
Animations plus animations/transitions
/* Animations plus animations/transitions */
/* ref: http://mattwilcox.net/sandbox/css3-animations-1/index.htm */
/* also ref: http://css-tricks.com/restart-css-animation/ */
.animate-on-load {animation: bgcolor 3s;}
.animate-on-hover:hover {animation: bgcolor 3s;}
.animate-on-hover2:hover {animation: bgcolor2 3s;} /* change anim name */
.animate-on-hover3:hover {animation: bgcolor 2.9s;} /* change duration */
.animate-on-hover4:hover {animation: bgcolor 3s 2;} /* change iteration-count */
.transition-on-hover {transition: background-color 2s;}
.transition-on-hover:hover {background-color: #777;}
@erikjung
erikjung / type.less
Created April 10, 2013 07:47
Type scaffolding with LESS 1.4 and Golden Ratio type measurements
@font-size-alpha: 45;
@font-size-beta: 28;
@font-size-gamma: 22;
@font-size-delta: 17;
@font-size-epsilon: 13;
@baseline: 28;
@type-unit: rem;
.font-size (@size) when (@type-unit = rem) {
.module {
margin-bottom: 18px;
margin-top: 18px;
}
.module {
margin-bottom: -12px;
margin-top: -12px;
}
.module {
margin-bottom: 24px;
@erikjung
erikjung / properties.txt
Created March 26, 2013 21:31
CSS property order via Twitter Recess
position
top
right
bottom
left
z-index
display
float
width
height