Skip to content

Instantly share code, notes, and snippets.

@ervinne13
Last active February 3, 2019 06:52
Show Gist options
  • Save ervinne13/31b3b41a8a3f85a6b33ec684269ffc97 to your computer and use it in GitHub Desktop.
Save ervinne13/31b3b41a8a3f85a6b33ec684269ffc97 to your computer and use it in GitHub Desktop.
Refactoring JavaScript: Separation of Concerns - Styles on JS
let foo = document.getElementById('foo');
foo.style.color = 'red';
foo.style.border = '2px solid #000';
foo.style.paddingLeft = '3px';
foo.style.marginTop = '3px';
foo.style.fontSize = '1.2em';
foo.style.fontStyle = 'italic';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment