css-in-js
css-in-js copied to clipboard
Invalid JavaScript syntax if the CSS property has a single-quote
First and foremost, awesome plugin I love it!
There is a problem that is slightly anoying though. When the CSS property is containing a single-quote, the JavaScript syntax is incorrect.
Example: if you transform: content: '';, the output will be content: '''', (4 single-quotes) which is incorrect. It should be either content: '""', or content: '\\\'\\\'',.
The worst example would be: content: 'I\'m bugged'; that will be transformed to content: ''I\'m bugged'',. It should be transformed to: '\'I\\\'m bugged\'', or '"I\\\'m bugged"'.
Or maybe it would be easier to use the backtick (`) in those situations.
Thanks for the issue, I think @gdad-s-river is working on this.
Terrific library! Thanks :)