This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::selection { | |
background: #000; | |
} | |
::-moz-selection { | |
background: #000; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Color format is #AARRGGBB where 'A' is alpha | |
background: rgba(0,0,0,0.3); | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#44000000,endColorstr=#44000000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addLoadEvent(func) { | |
var oldonload = window.onload; | |
if (typeof window.onload != 'function') { | |
window.onload = func; | |
} else { | |
window.onload = function() { | |
oldonload(); | |
func(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reusable x-browser XMLHttpRequest | |
function getHTTPObject() { | |
var xhr = false; | |
if (window.XMLHttpRequest) { | |
xhr = new XMLHttpRequest(); | |
} else if (window.ActiveXObject) { | |
try { | |
xhr = new ActiveXObject("Msxml2.XMLHTTP"); | |
} catch(e) { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prototype Example | |
var Example = function(a, b) { | |
this.product = this.mult(a, b); | |
this.power = this.pow(a, b); | |
}; | |
Example.prototype = { | |
mult: function(a, b) { | |
return a * b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.MyApp = (window.MyApp || {}); | |
MyApp.MyUtils = (function() { | |
return { | |
doHandyThing1: function() {}, | |
doHandyThing2: function() {} | |
}; | |
}()); | |
MyApp.MyModule = (function( utils ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MyModule = (function() { | |
var ModuleExport = function() { | |
// Do constructor stuff. | |
}; | |
ModuleExport.prototype = { | |
doStuff: function( param ) { | |
// do stuff, then... | |
this.doOtherStuff(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Media Queries for Standard Devices courtesy of Chris Coyier and CSS Tricks | |
// http://css-tricks.com/snippets/css/media-queries-for-standard-devices/ | |
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
// Styles | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// REM Font Size Mixin | |
html { | |
font-size: 62.5%; | |
} | |
@mixin font-size ( $size: 14 ) { | |
font-size: $size + px; | |
font-size: $size/10 + rem; | |
} | |
body { | |
@include font-size( 14 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Helvetica Font Stack | |
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; | |
font-weight: 300; | |
// Times New Roman-based stack | |
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; | |
// Modern Georgia-based serif stack | |
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif; |
OlderNewer