This file contains hidden or 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
@mixin triangle( | |
$dir: top, | |
$pos: 50%, | |
$color1: #fff, | |
$color2: darken($color1, 30%), | |
$size1: 6px, | |
$size2: $size1 | |
) { | |
$opos: map-get(( top: bottom, right: left, bottom: top, left: right ), $dir); | |
$transparent: if($dir == left or $dir == right, (top, bottom), (left, right)); |
This file contains hidden or 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
/////////////////////////////////////////////////////////////////// | |
// Extending the standard compass CSS3 mixins with CSS3PIE | |
/////////////////////////////////////////////////////////////////// | |
$pie: url('/RELATIVE/PATH/TO/PIE.htc'); | |
$pie-approach: relative; | |
@import "compass/css3"; | |
@mixin pie-border-radius($radius, $position: $pie-approach) { |
This file contains hidden or 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
/* With a CSS grid system */ | |
/* Using a Css system, you'll have in your mark-up something like that | |
* | |
* <div class="col span_1_of_2"></div> | |
* <div class="col span_1_of_2"></div> | |
* | |
* Then, for a simple rwd task, you'll have this in your CSS: | |
* (taken from http://www.responsivegridsystem.com/) | |
*/ |
This file contains hidden or 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
// With Salsa | |
// | |
// Using a Sass based system, my mark-up can look something like this: | |
// | |
// <article></article> | |
// <aside><aside> | |
// | |
// and in my scss file, I'll do | |
@import "settings"; |
This file contains hidden or 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
javascript:(function(){ | |
function encodeString(string) { | |
return encodeURIComponent(string | |
.replace(/\\/g,"\\\\") | |
.replace(/\"/g, '\\"') | |
.replace(/\n\r?/g, '\\n') | |
.replace(/%/g, 'U0025') | |
.replace(/</g, '\\<') | |
.replace(/>/g, '\\>') | |
.replace(/script/ig, 'scr\"\+\"ipt') |
This file contains hidden or 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($) { | |
// My micro jQuery templating engine | |
// Include this script before your closing </body> tag. | |
// Usage: | |
// | |
// <section data-html="content"></section> | |
// | |
// This will load <html/content.html> into <section> |
This file contains hidden or 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
@mixin size($x, $y: $x) { | |
@if type_of($x) == string { | |
width: image-width($x); | |
} @else { | |
width: $x; | |
} | |
@if type_of($y) == string { | |
height: image-height($y); | |
} @else { | |
height: $y; |
This file contains hidden or 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
<?php | |
/** | |
* Put this in your template.php | |
* Change YOURTHEME to your theme name and YOUR_DISQUS_SHORTNAME to yours. | |
* Implements template_preprocess_page(). | |
*/ | |
function YOURTHEME_preprocess_page(&$variables, $hook) { | |
// inlineDisqussions |
This file contains hidden or 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 THEME_image_style($variables) { | |
// Skip GIFs. | |
$ext = pathinfo($variables['path'], PATHINFO_EXTENSION); | |
if ($ext == 'gif') { | |
return theme('image', $variables); | |
} | |
// Determine the dimensions of the styled image. | |
$dimensions = array( |
This file contains hidden or 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
/////////////////////////////////////////////////// | |
// SASS & Compass tooltip mixin | |
/////////////////////////////////////////////////// | |
@mixin tooltip( | |
$dir: top, | |
$pos: 50%, | |
$color1: #fff, | |
$color2: darken($color1, 30%), | |
$size1: 6px, |