--- page: https://salty-css.dev/concepts/why-salty-css-exists index: https://salty-css.dev/llms.txt author: [Teemu Lahjalahti](https://www.linkedin.com/in/teemulahjalahti/) lastUpdated: 2026-10-29 breadcrumbs: [Concepts](https://salty-css.dev/concepts) / [Why Salty CSS Exists](https://salty-css.dev/concepts/why-salty-css-exists) --- # The Origin Story Behind Salty CSS, Why Salty CSS Exists and Who It’s For ![Birch tree's trunk reaching towards the sky](https://salty-css.dev/_astro/origins.DerbAe0f.jpg) Documentation websites often only focus on explaining *how* the library at hand works. But here I want to tell the story about why Salty CSS was built, what it’s solving and just as importantly, who it isn’t for. --- ## Salty CSS in plain terms Salty CSS is an open-source project that helps developers create the styles for a website or web app. Plenty of similar solutions already exist, and Salty isn’t trying to disrupt the CSS tooling ecosystem, it just brings a different set of opinions and learnings, aiming for a good developer experience through type safety, great API ergonomics built for developers, and a lot of built-in features that others might skip. It’s built to work with modern web libraries and frameworks like React, Next.js, and Astro and is best suited for building brand-led websites. ## The origin story After years of handcrafting design-led websites, I’d built up a fairly specific idea of how styling could work and, just as much, which tradeoffs I was willing to make to get what I want. I kept watching the ecosystem solve my problems in ways that cut against how I actually wanted to build websites, and a tool that made those tradeoffs the way I’d make them just didn’t exist. I’m Teemu Lahjalahti — Teemukissa to a few people — and Salty CSS is the side project I keep poking at to see how big it can get. It started after a frustrating day at the office. I found myself on a train to Iisalmi to visit a good friend, opened a new project somewhere along the way to see if I could just make the thing work — and by the time I got back to Helsinki I had a working proof of concept in hand. That’s when it stopped being something to be salty about and turned into a question: what else can I do with this, and how stupid can I get? ## What shaped it Two things set this off: a library I loved went away, and the ground underneath it shifted. The library was [Stitches](https://stitches.dev/) which was a huge inspiration and its death was the original spark to create something new. Its typed, variant-driven **styled** API was simply a joy to use, and when Stitches was discontinued I went hunting for a replacement, worked through the alternatives, and eventually got stupid enough to build my own. The ground shifting is the bigger half. React Server Components and the swing back to server-first frameworks like Astro put real structural pressure on runtime CSS-in-JS: the old model leaned on React Context for theming and injected styles during render, and in a server-rendered world, where much of your tree never touches a client runtime, that becomes a liability. **Astro pushed me especially hard.** I love building with it, and native, zero-runtime styling that feels at home there is rare; a lot of what I wanted simply didn’t exist. The ecosystem’s other answers mostly went two ways, if not doing both at the same time — static extraction that analyzes your code without running it, and atomic CSS that optimizes for the tiniest possible stylesheet. Both are legitimate, and keeping a build-time styling tool alive across a churning bundler ecosystem is genuinely hard work that I respect. They just weren’t the directions I wanted to take. I wanted to keep the component-first **styled** API, *share* code within the style files rather than statically analyze them while leaving the imports out, and lean on native browser features for theming and overrides, skipping client side bundle phobias. CSS Modules weren’t the answer either; I wanted type-safe, reusable components. The **styled** + TypeScript combination lets you build atoms directly, with variants managed as typed props instead of hand-rolled class-name juggling. A brand-led environment shaped every important decision. A lot of the work is about crafting the nicest-looking atoms you can and seeing how they fit together (and trying to scope that kind of detail inside nested utility classes is genuinely painful). And a fair amount of all of Salty CSS is simply my own opinions. Years of building brand-led websites a certain way plus my own experiments and other open-source projects added up to a fairly specific idea of how styling should feel. Salty CSS was shaped by all of that history and from the fact that I did not want to wait for someone else to *maybe* do something similar in the far future. ## Where it came from Salty CSS wasn’t created out of an abstract idea. It formed out of my agency work building brand-led, design-heavy sites — and it’s very much a long running side project of mine, not something tied to any particular company or client. Much of this work that I have been doing is dependent on dynamic values and logic. The websites I have built are headless-CMS-driven, allowing different possibilities with the same base code and so the same component or molecule has to handle many different cases through a single, consistent variant API. You can’t hardcode every organism and template in advance. To achieve the dynamic layouts for that kind of project, we need an atomic approach and a typed, composable API. For that problem, **styled** plus good TypeScript is the only combination I’ve found that scales cleanly. I built Salty CSS for myself first and validated it with my own projects; the agency work is simply where the requirements came from. That’s why Salty CSS optimizes for high-fidelity, dynamic, design-led sites rather than for the leanest possible dashboard. ## Who it’s for, and who it isn’t I’d rather you pick the right tool than pick mine. So, plainly: **Salty CSS is a good fit if you’re** building design-led or highly dynamic sites, working server-first with React Server Components or Astro, missing the Stitches-style **styled** DX but unwilling to pay a runtime cost for it, or assembling your own design system from primitives rather than adopting a pre-baked UI kit. **It might not be the tool if you’re** building lean, repetitive, utilitarian dashboards where the absolute smallest stylesheet is the priority — atomic CSS might genuinely be the better fit there, and I’ll happily say so. And if your team is deep in a legacy runtime CSS-in-JS codebase and not yet thinking in native-web-standards terms, I won’t pretend migration is painless. It isn’t, and I can’t market it as easy. (AI assistants help a lot with the translation work these days, for what it’s worth.) ## What Salty CSS is right now *Some honesty about where things stand, so your expectations are calibrated.* Salty CSS is stable and already used to ship real sites, currently *still* at a pre-1.0 release. I’m not planning major breaking changes before V2 and reaching V1 is largely about committing to proper semantic versioning from now on. It’s been in development since the autumn of 2024, mostly as a side project that gets the most attention when I have proper focus to give to it. And I’m deliberately not in "I am the new industry standard" mindset: the near-term goal is to ship V1, gather more real users, build a community — maybe even new maintainers — heading into V2 and V3. If you want a reason to start testing it even though it’s largely a one-person project: it’s used to build actual client websites, and real stakes keep it maintained — which is exactly the failure mode that kills so many open-source side projects. I keep it current because I depend on it too. Usually a fix just takes me cracking open a beer and getting it done. ## Prior art & acknowledgments Salty CSS didn’t appear from nowhere, and it isn’t trying to win a head-to-head fight with the libraries that shaped it. So, let's give credit where credit is due: - **Stitches** — the big one, and the closest thing this list has to an old love that got away. Its variant model and the client-side developer experience it delivered were a genuine joy, and honestly its death is what sent me looking in the first place. It isn’t the *single* reason Salty exists, but it’s the feeling Salty will always be chasing. - **Panda CSS** taught me a lot about approaching server-first styling, and about how to evolve the already-brilliant API Stitches pioneered. You’ll find its fingerprints in Salty on purpose — conventions like `base`, and treating text styles as `templates`, are adopted directly because they’re good ideas. - **Vanilla Extract** is where the `.css.ts` execution model comes from. The idea that your styles can live in their own files — like the old days — but with the full power of TypeScript was an architectural benchmark. If one of these fits your project better, use it with my blessing — they’re excellent, and Salty is better for existing alongside them, spicing up the mix. 🧂 While I want to keep Salty CSS as a project with real goals, none of this has to *feel* like a corporate procurement decision to be taken super seriously. The name itself originates from somewhere between an inside pun and the sweaty offices some might call salt mines where any CSS work can feel like a chore for most web developers. So while I’m putting the cat on the table and telling bad jokes, what matters underneath is the engineering — the umami — that’s the real reason anyone should reach for Salty CSS. --- Concept pages for Salty CSS are created to guide you through the technical details of the compiler, show a scoping model fixing some CSS headaches, iterate a theming mindset into atomic design and introduce why the styled function is my favorite way to create components. I have created these to have a space where I can expand my creative thinking behind Salty CSS and even remember myself why building something on your own has value. Thank you for reading this far, there is still some good stuff coming up! --- ## Related Links Previous: [Docs](https://salty-css.dev/react/docs) Next up: [Compiler & Zero-Runtime](https://salty-css.dev/concepts/compiler) ### Where to go next: * [Compiler & Zero-Runtime](https://salty-css.dev/concepts/compiler) * [Design Philosophy](https://salty-css.dev/concepts/design-philosophy) * [The Styled API](https://salty-css.dev/concepts/styled-api) * [Scoping & Specificity](https://salty-css.dev/concepts/scoping) * [Theming](https://salty-css.dev/concepts/theming) * [Basic setup](https://salty-css.dev/react/docs/getting-started/basic-setup) ### API References: * [Styled Components](https://salty-css.dev/react/docs/basics/styled-components) * [Variants](https://salty-css.dev/react/docs/basics/variants) * [API overview](https://salty-css.dev/react/docs/getting-started/api-overview) * [File structure](https://salty-css.dev/react/docs/getting-started/file-structure) ### External Knowledge: * [Stitches · Home](https://stitches.dev) * [Stitches · No longer maintained](https://github.com/stitchesjs/stitches/discussions/1149) * [Panda CSS · Home](https://panda-css.com) * [Vanilla Extract · Home](https://vanilla-extract.style) * [Astro Docs · Styling and CSS](https://docs.astro.build/en/guides/styling)