Skip to content

Instantly share code, notes, and snippets.

@sonnyprince
sonnyprince / gist:2d9d769e9c997cd05fed
Created October 29, 2014 09:37
Reload masonry after images have loaded
jQuery( document ).ready( function( $ ) {
var container = $('.TheMasonryContainer').masonry();
// layout Masonry again after all images have loaded
container.imagesLoaded( function() {
container.masonry();
});
});
@sonnyprince
sonnyprince / imgHoverJitterFix
Created October 29, 2014 09:34
Mixin to stop image hover jitter with opacity
@mixin imageOpacityFix() {
-webkit-transform: rotate(0);
-moz-transform: rotate(0);
-o-transform: rotate(0);
transform: rotate(0);
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
}
@sonnyprince
sonnyprince / ieSVGfix
Created October 29, 2014 09:31
SVG height fix in IE9 / IE10 on responsive build
@media screen and (min-width:0\0) {
/* IE9 and IE10 rule sets go here */
.parentSelector {
img {
max-width: none;
width: 100% !important;
}
}
}
require 'sass'
## install Linguistics gem, sudo install gem linguistics
require 'linguistics'
Linguistics::use( :en ) # extends Array, String, and Numeric
## this is the linguistics gem,
## instructions on how to use, http://deveiate.org/projects/Linguistics/wiki/English
## 5.en.numwords would output 'five'