Created
August 1, 2022 23:40
-
-
Save juiceqa/c146fd7b8f866ead5e5cbdccb30b0863 to your computer and use it in GitHub Desktop.
[CSS Layout Detector] #devtools #js
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
// tiny CSS layout "debugger" | |
// from https://gist.github.com/addyosmani/fd3999ea7fce242756b1 | |
// puts random color border around each element | |
/* global $$ */ | |
/* jshint -W016 */ | |
[].forEach.call($$('*'), | |
function (a) { | |
a.style.outline = '1px solid #' + (~~(Math.random() * (1 << 24))).toString(16); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment