Created
October 25, 2016 15:26
-
-
Save 1602/08dd93afc23caae486abfe2eea1e17ca to your computer and use it in GitHub Desktop.
Snippet to convert css string to inline elm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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