DEV Community

Cover image for Write plain CSS while reaping the benefits of CSS-in-JS

Write plain CSS while reaping the benefits of CSS-in-JS

Sasha Koss on August 08, 2019

Modern CSS land is divided into CSS-in-JS followers and plain CSS adherents with an ongoing controversy about which approach is superior. Despite t...
Collapse
 
nodeicode profile image
Lohit Aryan

Damm the concept sounds good and its true that the reason for using CSS in JS is due to its compatibility but this IS actually Faster.I know from experience with ReactJS and styled Components Thanks man! gonna definitely try this out

Collapse
 
kossnocorp profile image
Sasha Koss

Amazing, I glad you liked it!

Collapse
 
arberbr profile image
Arber Braja

Im sure this works as all other libraries that help with this. Each library has its own way of dealing with CSS but personaly will not use this on my projects.

Still IMO using sass or CSS with vars and styled components is better.

The thing with these libraries is that most of them add their own syntax on top of CSS. As if CSS's syntax is not hard enough as it is.

So yeah, writing code in pure CSS or SASS, for me personaly is still the right choice.

Thank you for the contribution and dont take it as im saying this library is worthless. Im noone to say that.

Collapse
 
kossnocorp profile image
Sasha Koss

Thank you for the feedback! 👍

Collapse
 
iskin profile image
Andrey Sitnik

Used this library and like it a lot. Great performance and nice API.

Collapse
 
kossnocorp profile image
Sasha Koss

Thank you so much for your kind words! May I quote you on the website? 🤗

Collapse
 
iskin profile image
Andrey Sitnik

Of course 😸🏳️‍🌈

Collapse
 
seanmclem profile image
Seanmclem

Can it use media queries, key-frames, and avoid fouc?

Collapse
 
kossnocorp profile image
Sasha Koss

Sure, you can do anything you can do with regular CSS.

Collapse
 
squidbe profile image
squidbe

Just an FYI: it's "reaping the benefits".

Collapse
 
kossnocorp profile image
Sasha Koss

Oh gosh, thank you!

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀 • Edited

You might like my series on JavaScript enhanced scss? It's related but you don't need a framework.