Skip to content

Instantly share code, notes, and snippets.

Avatar

Marty Zalega evilmarty

View GitHub Profile
@evilmarty
evilmarty / README.md
Created Oct 25, 2012
Sass vendor helper mixins
View README.md

If like me you find it frustrating to define the same vendor prefixes over and over again. Sure, you might create mixins that help reduce the amount of repetitiveness but when your mixins file becomes a library (or not) you see so many lines of near-identical code and wonder if there is an easier way.

Say you have this (all-too familiar) mixin:

@mixin border-radius($radius) {
  -webkit-border-radius: $radius;
  -moz-border-radius: $radius;
  -ms-border-radius: $radius;
  -o-border-radius: $radius;
@evilmarty
evilmarty / README.md
Created Oct 25, 2012
Sass vendor helper mixins
View README.md

If like me you find it frustrating to define the same vendor prefixes over and over again. Sure, you might create mixins that help reduce the amount of repetitiveness but when your mixins file becomes a library (or not) you see so many lines of near-identical code and wonder if there is an easier way.

Say you have this (all-too familiar) mixin:

@mixin border-radius($radius) {
  -webkit-border-radius: $radius;
  -moz-border-radius: $radius;
  -ms-border-radius: $radius;
  -o-border-radius: $radius;
@evilmarty
evilmarty / dabblet.css
Created Jun 29, 2012
styling the calendar indicator for webkit
View dabblet.css
html {
background: #f06;
background: linear-gradient(90deg, #cceecc,#eeeeee);
min-height: 100%;
}
input[type=date] {
background: #ccc;
background: linear-gradient(90deg, #ddd, #ccc);
border: 3px solid #eee;
border-radius: 20px;
@evilmarty
evilmarty / dabblet.css
Created Feb 14, 2012
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
@import url(http://fonts.googleapis.com/css?family=Lilita+One|Quicksand:700|Passion+One);
body {
background: #0AF;
background-image: -webkit-repeating-radial-gradient( hsla(200,100%,80%,.8) 0px, hsla(200,100%,80%,.5) 4px, hsla(200,100%,80%,0) 50px), -webkit-repeating-radial-gradient( hsla(260,100%, 0%, 0) 0px, hsla(260,100%,50%,.1) 2px, hsla(260,100%, 0%,0) 10px);
background-size: 40px 40px;
background-position: 50% 50%;
@evilmarty
evilmarty / gist:1338499
Created Nov 4, 2011
Mobile Safari form label to input focusing
View gist:1338499
// For use in jQuery
// Some mobile browsers (ie. Mobile Safari) don't focus their associated inputs
// so we force that behavior when possible.
$('label[for]')
// First we check when a label is touched and is associated with a radio or checkbox input,
// if so then we mark it as having focus.
.live('touchstart', function(event) {
var input = event.target.control ? $(event.target.control) : $('#' + event.target.htmlFor);
if (input.is('[type=checkbox], [type=radio]'))
@evilmarty
evilmarty / edh.js
Created Oct 19, 2011
EDH javascript [old] api
View edh.js
/*
** Everyday Hero Javascript API (incomplete)
** http://api.everydayhero.com.au
**
** dependencies: jQuery
*/
var EDH = {
baseURI: 'http://api.everydayhero.com.au/widget/',
ordinalize: function(number) {
number = parseInt(number);