Skip to content

Instantly share code, notes, and snippets.

@gregwhitworth
Created February 28, 2017 01:34
Show Gist options
  • Save gregwhitworth/ff8ce6d59ccdd6dd8234d4ffd4acd7a9 to your computer and use it in GitHub Desktop.
Save gregwhitworth/ff8ce6d59ccdd6dd8234d4ffd4acd7a9 to your computer and use it in GitHub Desktop.
custom-props-set-property.js
var myComponent = document.getElementsByClassName('my-component')[0];
myComponent.style.setProperty('--primary', 'green');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment