Created
October 4, 2017 19:04
-
-
Save alana314/54ae97fd72a9d97d230190fefe518e0a to your computer and use it in GitHub Desktop.
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
//Calculates current em size in pixels, tests current Foundation 5 media query size and logs it in the console | |
//Create a new bookmark and paste this as the URL: | |
javascript: var width = document.body.clientWidth;var em = parseFloat(getComputedStyle(document.body).getPropertyValue('font-size'));if (width < 40 * em) { console.log('small', width);} else if (width < 64 * em) { console.log('medium', width);} else if (width < 90 * em) { console.log('large', width);} else if (width < 120 * em) { console.log('xlarge', width);} else { console.log('xxlarge', width);} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment