Skip to content

Instantly share code, notes, and snippets.

View jordandobson's full-sized avatar
🥽

Jordan Dobson jordandobson

🥽
View GitHub Profile
@jordandobson
jordandobson / orientation-detection.css
Created August 10, 2012 06:05
Orientation detection CSS
/***************************************************************************
** Orientation Indicators
***************************************************************************/
.orientation{
position: absolute;
top: .5em;
right: .5em;
z-index: 1000;
@jordandobson
jordandobson / gist:2245096
Created March 30, 2012 00:04
Grid CSS @ 10px for Compass
$grid-color: #000;
$grid-opacity: .15;
$clear: transparent;
#grid{
width: 100%;
height: 100%;
position: absolute;
/* Old Webkit */
@jordandobson
jordandobson / gist:1541922
Created December 30, 2011 22:59
Markup for a review
<blockquote>
<header>
<meter>
<strong>5</strong><span> of 5</span>
</meter>
<address>
<strong>Diane S</strong> from Edmonds, WA
</address>
<h1>We came to the Westin to check out the beds.</h1>
</header>
@jordandobson
jordandobson / CLS.js
Created June 8, 2011 00:15
Mobile JavaScript Library for HTML Class Attribute Manipulation
(function(document){
window.CLS = window.CLS || {};
CLS.add = function(el, cn){
if(!CLS.exists(el, cn)){
el.className = el.className ? el.className + ' ' + cn : cn;
}
}
<div id="the_div">
<ul id="the_list">
<li id="the_item">Click me!</li>
</ul>
</div>
<p id="log"></p>
<script type="text/javascript" charset="utf-8">
function log(string){
var Car = function(make, color){
this.make = make;
this.color = color;
};
function logCar(c){
console.log("I'm a " + c.color + " " + c.make);
}
Car.prototype.log = function(){
@jordandobson
jordandobson / closure.js
Created March 3, 2011 20:17
create closure
(function(countdown, container){
var index;
function log(){
console.log(index);
}
function iterate(){
log();
@jordandobson
jordandobson / vignette.css
Created November 25, 2010 09:28
Examples of adding a Vignette to Photos with CSS3 Gradients. Code sampled from: http://cl.ly/3Nxc
/* Border & Vignette Setup */
figure{
position: relative;
display: block;
line-height: 0;
width: 500px;
height: 333px;
margin-bottom: 2em;
border: 1em solid #fff;
@jordandobson
jordandobson / css_tabbar_highlight_webkit_gradient.css
Created October 15, 2010 22:01
iOS Tab Bar Highlight with Webkit CSS Gradients. Code Sampled from: http://cl.ly/2qas
/* Sets Size of box containing gradients */
.layer{
width: 48px;
height: 32px;
}
/* Final Combined Gradient Image Composition */
.all{
if (window.devicePixelRatio == 2) {
// All yer codez Here
}