4 ms·
The differentiating feature of Atlassian’s @compiled package is not the “build time atomic css” - it’s that you can distribute components that use @compiled on
by jitl 6y ago
The differentiating feature of Atlassian’s @compiled package is not the “build time atomic css” - it’s that you can distribute components that use @compiled on NPM without requiring your consumer to futz with Webpack include paths for e.g. CSS files. Do I have that right? @madou is the extraction shipping yet? The docs have a few places that say “coming in 2021” - what’s the status?
For those interested in build-time CSS in JS, also called Zero-runtime CSS in JS, you might also want to check out:
- Linaria (https://github.com/callstack/linaria https://github.com/callstack/linaria) I use on my personal site. I ran into trouble/bugs trying to integrate it with Notion’s build process; the Webpack/babel bits are very brittle.
- Treat requires that you write the JS that computes your styles in esperare xxx.treat.js files which is annoying from my point of view - I want single file components. (https://seek-oss.github.io/treat/ https://seek-oss.github.io/treat/)
- No idea about this one, but it’s more recent. Has some other interesting things in the inspiration section of the README https://github.com/CraigCav/css-zero https://github.com/CraigCav/css-zero
- nwienert 6y agoI’ve been working on one that runs on top of React Native Web. Compiles to atomic CSS on web, and StyleSheet on native. It marries in-line style props (like JSXStyle) with SwiftUI style stack views. It’s very much alpha, on my GitHub.
- have_faith 6y agoHave also been using Linaria on a side project recently, enjoying it a lot so far. I skipped most of the other css-in-js solutions when I saw they where using runtime js to manipulate styling which intuitively just feels unnecessary for 99% of the pages style. Very happy with Linaria so far.