64

Bruce Lawson | CSS-in-JS: FTW || WTF? | CSS Day 2018

 5 years ago
source link: https://www.tuicool.com/articles/hit/UnuMvyA
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Everyone's talking about CSS-in-JS. It's the Kim Kardashian of web development. And, as with Kimmie, opinions are polarised. To some, CSS in JS just makes sense: it's local to your component, it can't leak and, hey, I know how to write JavaScript and CSS is weird.

To others, CSS-in-JS is an abomination that makes them want to emulate Kimmie and "release a fragrance" in disdain. Why are scripters so afraid of the cascade? Why the hesitance about inheritance?

Let's look at what CSS seems to lack, what the CSS-in-JS libraries can teach us, so we don't do as Kim's buttocks did and "Break the Internet".

Slides: noti.st/brucelawson/5O0d81/css-in-js-ftw-wtf

About Bruce: brucelawson.co.uk

More about CSS Day: cssday.nl or twitter.com/cssdayconf

Receive updates in your inbox: cssday.nl/subscribe


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK