Skip to content

Instantly share code, notes, and snippets.

@jserrao
Created February 24, 2017 04:55
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 jserrao/47b2e122822aeaf4d04ad1357c2f9861 to your computer and use it in GitHub Desktop.
Save jserrao/47b2e122822aeaf4d04ad1357c2f9861 to your computer and use it in GitHub Desktop.
Read a pseudo class in JS
// How to read a pseudo class in JS
window.getComputedStyle(
document.querySelector('.element'), ':before'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment