Skip to content

Instantly share code, notes, and snippets.

@coreyward
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save coreyward/9657280 to your computer and use it in GitHub Desktop.

Select an option

Save coreyward/9657280 to your computer and use it in GitHub Desktop.
Quick and dirty way to find DOM elements that are breaking your vertical baseline grid.
$('div,p,section,header,footer,ul,ol,li').each(function(){
var h, el, baseline;
el = $(this);
height = el.outerHeight();
baseline = 13;
if (Math.round(height) % baseline > 0) {
el.addClass('boink');
console.log( height, this );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment