--- page: https://salty-css.dev/concepts/design-philosophy index: https://salty-css.dev/llms.txt author: [Teemu Lahjalahti](https://www.linkedin.com/in/teemulahjalahti/) lastUpdated: 2026-10-01 breadcrumbs: [Concepts](https://salty-css.dev/concepts) / [Design Philosophy](https://salty-css.dev/concepts/design-philosophy) --- # Philosophy Behind Why Salty CSS Is Made For Semantic Components Over Atomic CSS and Primitives Over Pre-baked UI Kits ![Crowberry bush in Lapland, Finland](https://salty-css.dev/_astro/philosophy.BMZeDCIR.jpg) Every styling library is a collection of tradeoffs. In recent years, the frontend ecosystem has optimized heavily for the absolute smallest possible CSS file size, sometimes at the direct expense of developer experience (DX) or code readability. --- Salty CSS makes a different set of tradeoffs. It prioritizes a TypeScript-first developer experience — flawed on its own terms, but those are the flaws I’d rather live with — alongside semantic component structures and out-of-the-box design system primitives. I’d rather spend a few extra kilobytes of heavily cached, gzipped CSS than spend developer time — of the two, developer time is by far the more expensive resource. This page lays out the philosophy behind those tradeoffs: why Salty CSS reaches for semantic components instead of the atomic paradigm for its target use cases, and why it ships primitives rather than a pre-baked UI kit. ## Why Not Atomic CSS? Atomic (or utility-first) CSS has dominated the conversation recently. Tools like Tailwind CSS generate a massive set of single-purpose classes, while build-time extractors like Panda CSS parse your AST to generate atomic classes on the fly. Let me be intellectually honest: when atomic CSS is done well, it really does produce a smaller global stylesheet — that’s its whole pitch, and it’s a fair one. If you’re building a lean, repetitive SaaS dashboard, atomic extraction is a genuinely great architectural choice, and I’d point you toward it without hesitation. But Salty CSS wasn’t built for lean SaaS dashboards. It was built for design-led, highly dynamic websites — the kind with complex, unique visual effects, dynamic content blocks (like headless-CMS layouts), and rich variants. In that world, the atomic model starts to strain in two ways: 1. **The HTML soup.** Utility-first approaches tend toward bloated, hard-to-read markup. Finding the actual DOM structure underneath forty utility classes is a real cognitive tax — and it gets worse, not better, as the designs get more ambitious. 2. **Scoping deeply nested, dynamic styles.** A lot of design-led work is about crafting the nicest-looking atoms and seeing how they connect — and the same atom often has to render differently depending on context — a dozen or more distinct configurations in a typical headless-CMS setup. Expressing all of that through atomic utilities gets awkward fast. Salty is happy to scope deeply nested style objects right inside a single `styled` call, which is exactly the shape this kind of work takes. ### Semantic Scoping & Mitigation Salty CSS chooses semantic, component-level scoping. When you write `styled("button", { ... })`, you get a single, predictable hash class that represents that exact visual state. The honest tradeoff is global stylesheet size, and Salty mitigates it through compiler architecture rather than pretending it away: - **Hash deduplication:** If two completely different components generate the exact same style object, they produce the same hash and are deduplicated in the final CSS automatically. - **Component-level import strategy:** By configuring `importStrategy: 'component'`, you can split your CSS so the browser only loads the stylesheets needed for the rendered route, rather than one monolithic global file. **On the roadmap: auto-extraction.** There’s a planned compiler optimization for production builds that would narrow the gap further: analyze the final stylesheet, find highly repeated property combinations (e.g. `display: flex; align-items: center; justify-content: center;`), and extract them into shared, semi-atomic rules automatically. You’d keep the component-level DX while the compiler quietly trims the final CSS weight. I can’t put a firm timeline on it, but the hope is to land an experimental version to test during V1. ## Primitives over Pre-baked UI Kits Salty CSS is not a UI kit. It does not give you a pre-styled `