Last active
August 29, 2015 13:57
-
-
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.
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
$('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