css-to-jss
css-to-jss copied to clipboard
Pseudo Class Support
For my use case i had css with lots of Css Pseudo Classes
here is a demo example
.titleContainer { display: flex; flex-direction: row; padding: 0 0 0 2rem; }
.titleContainer:hover { font-weight: 900; }
Expected Behaviour ( as per JSS library ):-
"titleContainer": { "display": "flex", "flexDirection": "row", "padding": "0 0 0 2rem", "&:hover": { "fontWeight": 900 } }
Actual Behaviour :-
.titleContainer { display: 'flex', flexDirection: 'row', padding: '0 0 0 2rem', }
.titleContainer:hover { fontWeight: 900, }
I had to convert whole css to Js Objects (JSS format) and i couldn't find a solution which could do that so finally i ended up making a solution for myself which can be seen here
it can convert whole Css to CssInJs ( for now as per JSS library ) in one short.
it would be great if we could discuss and collaborate on our solutions.
PS : i explored your extension after making my own solution and i was literally surprised to see how did we ended up making similar logo XD