Skip to content

Instantly share code, notes, and snippets.

@koycarraway
koycarraway / gist:10934164
Created April 16, 2014 21:19
Link Underline
a {
background-image: -webkit-gradient(linear,left top,left bottom,from(transparent),to(#ddd));
background-image: -webkit-linear-gradient(top,transparent 50%,#ddd 50%);
background-image: linear-gradient(to bottom,transparent 50%,#ddd 50%);
background-image: none;
color: red;
background-repeat: repeat-x;
-webkit-background-size: 2px 2px;
background-size: 2px 2px;
background-position: 0 90%;
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};
@koycarraway
koycarraway / osx-font-rendering.scss
Last active August 29, 2015 14:04
Font rendering on OS X
// Mixin
@mixin font-smoothing($value: on) {
@if $value == on {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@else {
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: auto;
@koycarraway
koycarraway / SassMeister-input-HTML.html
Created July 31, 2014 17:22
Generated by SassMeister.com.
<div>
<input type="radio" id="only_admins_see_billable_rates_true" name="only_admins_see_billable_rates" value="true">
<label class="inline" for="only_admins_see_billable_rates_true">Admins</label>
<input type="radio" id="only_admins_see_billable_rates_false" name="only_admins_see_billable_rates" value="false">
<label class="inline" for="only_admins_see_billable_rates_false">Everyone</label>
</div>
@koycarraway
koycarraway / SassMeister-input-HTML.html
Created July 31, 2014 17:22
Generated by SassMeister.com.
<span class="icn-toggle"></span>
@koycarraway
koycarraway / SassMeister-input-HTML.html
Created July 31, 2014 17:22
Generated by SassMeister.com.
<span class="icn-toggle"></span>
// @font-face Custom
@mixin fontface($font-family, $file-path, $weight: normal, $style: normal) {
@font-face {
font-family: $font-family;
font-weight: $weight;
font-style: $style;
src: url('#{$file-path}.eot');
src: url('#{$file-path}.eot?#iefix') format('embedded-opentype'),
url('#{$file-path}.woff') format('woff'),
url('#{$file-path}.ttf') format('truetype');
@koycarraway
koycarraway / _hoefFont.scss
Last active August 29, 2015 14:05
H&Co Typography Mixin
// H&Co Typography mixin -------------------------------------------------------------
//
// $fontFamily: gotham, Sentinel, whitney
// $fontWeight: light, book, medium, semibold, bold, black
// $SSm: true, false (ScreenSmart Font?)
// $fontStyle: normal, italic
//
// USAGE: @include HoefFont(gotham, bold, true);
@function capitalize($string) {
@koycarraway
koycarraway / gulpfile.js
Created August 26, 2014 04:25
Gulp Plumber Notify Error
var plumber = require('gulp-plumber');
var notify = require('gulp-notify');
// SASS style sheets
gulp.task('styles', function () {
return gulp.src('./PATH')
.pipe(plumber({
errorHandler: notify.onError("Error: <%= error.message %>")
}))
});
@koycarraway
koycarraway / SassMeister-input.scss
Created August 27, 2014 15:37
Generated by SassMeister.com.
// ----
// Sass (v3.4.1)
// Compass (v1.0.1)
// ----
$currentDate: current-date('%A, %b %e %Y');
$currentTime: current-time('%T %p %Z');
/*
Date: #{$currentDate}