I’m joined by Dustin Schau in this video and he is going to take me on a tour of the world of what has come to be known as CSS-in-JS. That is, doing your styling entirely in JavaScript, rather than in .css
files that you <link>
up in the head all on your own.
Dustin is a perfect guide for this, as he created a great exploratory tool called CSS in JS Playground and also has a brand new course on the subject.
If you’re curious why anyone would be interested in going the CSS-in-JS route at all, here’s some reasons we discuss in the video:
And that’s not everything, but you can see why it’s compelling to some people. It has certainly inspired lots of discussion. Why not when it offers all those benefits? Well, it’s a very different development environment that doesn’t necessarily click with everyone. It requires bending the web platform to do somewhat unusual things and that comes with warts. Not to mention there is a literal cost to it (size of packages and such) that users pay for, which you’d better hope pays for itself with efficiency.
Dustin went so far as to build out a demo using Sass to style things to compare it with how it can be done with CSS-in-JS, which demonstrates how porting styles looks as well as the possibilities of doing it.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4