Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save matthewlopez0977/ca4b3693cc13bfad1c1aa2bffbf1864f to your computer and use it in GitHub Desktop.

Select an option

Save matthewlopez0977/ca4b3693cc13bfad1c1aa2bffbf1864f to your computer and use it in GitHub Desktop.
Get Pseudo-Element Properties with JavaScript
var color = window.getComputedStyle(
document.querySelector('.element'), ':before'
).getPropertyValue('color')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment