Direct link to the article Web Standards Meet User-Land: Using CSS-in-JS to Style Custom Elements

Web Standards Meet User-Land: Using CSS-in-JS to Style Custom Elements

The popularity of CSS-in-JS has mostly come from the React community, and indeed many CSS-in-JS libraries are React-specific. However, Emotion, the most popular library in terms of npm downloads, is framework agnostic.

Using the shadow DOM is common when …

Avatar of Ollie Williams
Ollie Williams on (Updated on )
Direct link to the article #170: Watch an Amateur Spin Up a React + Babel + Webpack + CSS Modules Project

#170: Watch an Amateur Spin Up a React + Babel + Webpack + CSS Modules Project

Fair warning! This isn’t a speedy, straightforward, expert-driven plow-through of how to set up these technologies. Although, by the end, we do successfully get it all going. This is about documenting the real-world experience of doing this kind of work. …

Avatar of Chris Coyier
Chris Coyier on
Direct link to the article The Fragmented, But Evolving State of CSS-in-JS

The Fragmented, But Evolving State of CSS-in-JS

TLDR: The CSS-in-JS community has converged on a consistent API.

Not so long ago, a Facebook engineer compiled a list of the available CSS-in-JS methodologies. It wasn’t short:

aphrodite, babel-plugin-css-in-js, babel-plugin-pre-style, bloody-react-styled, classy, csjs, css-constructor, css-light, css-loader, css-ns, cssobj, cssx-loader, …

Avatar of Ollie Williams
Ollie Williams on (Updated on )
Direct link to the article Bridging the Gap Between CSS and JavaScript: CSS Modules, PostCSS and the Future of CSS

Bridging the Gap Between CSS and JavaScript: CSS Modules, PostCSS and the Future of CSS

In the previous post in this two-part series, we explored the CSS-in-JS landscape and, we realized not only that CSS-in-JS can produce critical styles, but also that some libraries don’t even have a runtime. We saw that user experience can …

Avatar of Matija Marohnić
Matija Marohnić on