Skip to content

Instantly share code, notes, and snippets.

@1602
Created October 25, 2016 15:26
Show Gist options
  • Save 1602/08dd93afc23caae486abfe2eea1e17ca to your computer and use it in GitHub Desktop.
Save 1602/08dd93afc23caae486abfe2eea1e17ca to your computer and use it in GitHub Desktop.
Snippet to convert css string to inline elm
const css2elm = css =>
'[ "' +
css
.replace(/: /g, '" => "')
.replace(/; /g, '"\n, "')
.replace(/;$/, '"\n]');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment