CssToReact icon indicating copy to clipboard operation
CssToReact copied to clipboard

Reverse transformation

Open srolel opened this issue 9 years ago • 3 comments

Hi, would it be possible to perform the opposite transformation? (json style to css/scss)

srolel avatar May 11 '16 08:05 srolel

It could be possible - this project is using https://www.npmjs.com/package/css to parse the css into the object representation. It has a stringify method that could reverse it.

staxmanade avatar May 11 '16 17:05 staxmanade

It accepts a CSS AST object, not the kind of style object this library produces.

srolel avatar May 18 '16 11:05 srolel

at my work we're going to have to migrate a bunch of inline react styles to css modules or styled components so i was hoping to find a tool that did the reverse transformation as well.

backgroundColor: "red", ---> background-color: red;

jacobworrel avatar Feb 10 '18 19:02 jacobworrel