Skip to content

Instantly share code, notes, and snippets.

@1602
Created October 25, 2016 15:26
Show Gist options
  • Select an option

  • Save 1602/08dd93afc23caae486abfe2eea1e17ca to your computer and use it in GitHub Desktop.

Select an option

Save 1602/08dd93afc23caae486abfe2eea1e17ca to your computer and use it in GitHub Desktop.

Revisions

  1. 1602 created this gist Oct 25, 2016.
    6 changes: 6 additions & 0 deletions css2elm.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    const css2elm = css =>
    '[ "' +
    css
    .replace(/: /g, '" => "')
    .replace(/; /g, '"\n, "')
    .replace(/;$/, '"\n]');