DEV Community

Cover image for Let's Take a Look at CSS in JS with React in 2019 - React-JSS

Let's Take a Look at CSS in JS with React in 2019 - React-JSS

Phil Tietjen on September 16, 2019

Hey! I'm back with the 2nd installment of my series where I decide to talk about CSS in js solutions for styling React applications. If this is yo...
Collapse
 
gjcampbell profile image
gjcampbell

I didn't see styled-components mentioned. What do you think about it? I'd take it over jss. Nothing wrong with jss, but SC is just outstanding.

Collapse
 
phizzard profile image
Phil Tietjen

Hey gj (Sorry I'm going off your username :) ), each entry in this series I'm doing is focusing on one package or solution at a time so that's why I didn't mention styled-components.

I'm going to try my very hardest not to spoil my thoughts on any of these until I get to writing a full piece on them.

Will I write about styled-components next? Will I like the styled API? Will I be able to finish this series before 2019 ends? Will I back out because I'm a coward?

Stay tuned for my next entry! :D

Collapse
 
gjcampbell profile image
gjcampbell

Your posts are good. Keep going. 👍

Collapse
 
dance2die profile image
Sung M. Kim

Does JSS use SCSS style syntax?
I see some SASS-style nesting and & to refer to the current element but unable to find a documentation on it.

Collapse
 
phizzard profile image
Phil Tietjen

Hey Sung,

Thanks for commenting!

You may have to go digging through the JSS plugin doc pages to see exactly what kind of syntax is offered.
I believe all the official plugins are included in the default preset so React-JSS should have access to that functionality.

In there are some SCSS nested like syntax and more! Was there specific functionality you were looking for?

Collapse
 
dance2die profile image
Sung M. Kim

Thank you for the follow-up, Phil.

I am not looking for a specific functionality, but was interested in whether I could convert existing SCSS styles directly to JSS with ease.

And forgot to mention, nice visuals with Tengen Toppa Gurren Lagann. (want to watch it again 🙂).

Collapse
 
pencillr profile image
Richard Lenkovits

Hi! Tengen Toppa Gurren Lagann fan here, love the GIFs :D
By the way, usually my problem is that I don't know how to use more advanced CSS selectors inline in js.

Collapse
 
phizzard profile image
Phil Tietjen

Hey Richard, the secret to the series is that the gifs are the real take aways! :D

Glad you liked it, the JSS docs have some great direction on how to achieve more advanced CSS like features. I believe that stuff is specifically included in some of their plugins.

But it's exactly stuff like that why I'm not the biggest fan of styles in JS objects is figuring out or finding the things you know in slightly different syntax! :(

Collapse
 
heymarkkop profile image
Mark Kop

Great article and nice gifs!

Collapse
 
phizzard profile image
Phil Tietjen

Glad you liked the read Mark! :D

I had fun forcing these gifs in here.