Skip to content

Instantly share code, notes, and snippets.

View boostbob's full-sized avatar
💣
Born to try

Bob Wang boostbob

💣
Born to try
  • boostbob
  • Chengdu, Sichuan, China
View GitHub Profile
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@boostbob
boostbob / gist:5712663
Last active December 18, 2015 02:39
foundation interchange basic usage
<img
src="/path/to/default.jpg"
data-interchange="[/path/to/default.jpg, (default)], [/path/to/bigger-image.jpg, (large)]"
/>
@boostbob
boostbob / gist:5712666
Last active December 18, 2015 02:39
foundation interchange named queries
<img
src="/path/to/default.jpg"
data-interchange="[/path/to/default.jpg, (only screen and (min-width: 1px))], [/path/to/bigger-image.jpg, (only screen and (min-width: 1280px))]"
/>
@boostbob
boostbob / gist:5712676
Last active December 18, 2015 02:39
foundation interchange named queries retina
<img src="/path/to/default.jpg"
data-interchange="[image_path, (screen and only (min-width: 640px) and (-webkit-min-device-pixel-ratio: 2))]"
/>
@boostbob
boostbob / gist:5712682
Created June 5, 2013 09:16
foundation interchange custom named queries
$(document).foundation('interchange', {
named_queries : {
my_custom_query : 'only screen and (max-width: 200px)'
}
});
@boostbob
boostbob / gist:5714666
Last active December 18, 2015 02:58
foundation interchange example javascript initialize
<script> document.write('<script src=' + ('__proto__' in {} ? 'javascripts/vendor/zepto' : 'javascripts/vendor/jquery') + '.js><\/script>') </script>
<script src="javascripts/foundation/foundation.js"></script>
<script src="javascripts/foundation/foundation.interchange.js"></script>
<script> $(document).foundation(); </script>
@boostbob
boostbob / gist:5714684
Last active December 18, 2015 02:58
foundation interchange example image tag
<div class="row">
<div class="large-12 columns">
<img src="http://foundation.zurb.com/docs/img/demos/interchange/smallest.jpg"
data-interchange="[http://foundation.zurb.com/docs/img/demos/interchange/smallest.jpg, (default)],
[http://foundation.zurb.com/docs/img/demos/interchange/smallest.jpg, (screen and (max-width: 568px))],
[http://foundation.zurb.com/docs/img/demos/interchange/small.jpg, (small)],
[http://foundation.zurb.com/docs/img/demos/interchange/large.jpg, (large)]">
</div>
</div>
@boostbob
boostbob / gist:5714941
Created June 5, 2013 15:48
foundation image markup changed
<img data-interchange="[http://foundation.zurb.com/docs/img/demos/interchange/smallest.jpg, (default)],
[http://foundation.zurb.com/docs/img/demos/interchange/smallest.jpg, (screen and (max-width: 568px))],
[http://foundation.zurb.com/docs/img/demos/interchange/small.jpg, (small)],
[http://foundation.zurb.com/docs/img/demos/interchange/large.jpg, (large)]"
src="http://foundation.zurb.com/docs/img/demos/interchange/small.jpg"
data-uuid="c78d3e8b-0142-34af-30d3-5afdcb4c42b6"
>
@boostbob
boostbob / gist:5715011
Created June 5, 2013 15:55
foundation interchange uuid
uuid : function (separator) {
var delim = separator || "-";
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
return (S4() + S4() + delim + S4() + delim + S4()
+ delim + S4() + delim + S4() + S4() + S4());
},