Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philwolstenholme/fc0e8052cd87d1e8cf7ce9815f659bfb to your computer and use it in GitHub Desktop.
Save philwolstenholme/fc0e8052cd87d1e8cf7ce9815f659bfb to your computer and use it in GitHub Desktop.
Take the CSS classes of the currently selected DOM node in Chrome devtools and output it as a comma and newline separated string ready to paste into an array
$0.classList.toString().split(" ").map(utilityClass => `'${utilityClass.trim()}',`).join('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment