CSS is Awesome

Migrating from Tailwind

Tailwind gives you atomic utilities; css-is-awesome gives you mixin-first composition and token-driven themes — fewer classes in your markup, one data-theme swap for the whole app.

Why migrate

Tailwind is a great atomic engine, and plenty of teams ship great products with it. If that's you, stay. The reasons to move off are almost always the same four: themes that need a rebuild, markup that drifts toward class soup, a consumer-side build pipeline, and JavaScript you didn't ask for.

Philosophy differences

The mental model shifts in four places. Layouts, sizing, and color semantics carry over once you remap them.

ConcernTailwindcss-is-awesome
Themingtailwind.config.js + rebuilddata-theme attribute + CSS custom properties
CompositionAtomic classes stacked on every elementMixin @include in SCSS, or a small set of .cia-* utilities
Build pipelineJIT / PurgeCSS scans templates at build timeNo build step on the consumer side — cia ships CSS
Dark modedark: variant on every affected classdata-theme="graphite" swaps one attribute for the whole app
Directive@apply btn-class text-sm (Tailwind class list)@include m.button-primary (mixin name)

Equivalents table

These are the substitutions you'll reach for daily. When a row lists both a utility and a mixin, pick whichever layer your project lives on — markup or SCSS.

Tailwindcss-is-awesome
class="flex items-center justify-center"class="cia-flex-center" or @include m.flex-center
class="grid grid-cols-2 gap-4"class="cia-grid cia-grid-cols-2 cia-gap-md" or @include m.grid(2)
class="p-4" / class="px-6 py-3"class="cia-p-md" / class="cia-px-lg cia-py-sm" (t-shirt scale — see utilities)
class="text-gray-700"style={{ color: "var(--ink-soft)" }} — or .cia-text-text-secondary for the closest semantic utility
class="bg-blue-500"style={{ background: "var(--ai)" }} (cia's indigo accent token)
class="rounded-lg shadow-md"style={{ borderRadius: "var(--radius-lg)", boxShadow: "var(--shadow-md)" }} or class="cia-rounded-lg cia-shadow-md"
class="hidden md:block"class="cia-hidden cia-md:block" (cia responsive prefix is cia-<bp>:, breakpoint keys are sm md lg xl 2xl)
@apply flex items-center gap-2@include m.inline(2) — or any other mixin. @include takes a mixin name, not a class list.
Headless UI <Menu><Dropdown> from cia
Headless UI <Dialog><Modal> from cia

Component mapping

Tailwind leaves behavior to you; most teams pull in Headless UI, Radix, or Alpine. cia ships the React layer in-core, so you can delete a dependency as you migrate.

Before & after

Same output, two markup styles. Tailwind first, then cia.

Button

<!-- Tailwind -->
<button type="button" class="bg-blue-500 hover:bg-blue-600 text-white font-medium px-4 py-2 rounded-md">
  Save changes
</button>
{/* css-is-awesome (React) */}
<Button variant="primary">Save changes</Button>

/* css-is-awesome (SCSS) */
.save-btn {
  @include m.button-primary;
}

Card

<!-- Tailwind -->
<div class="bg-white rounded-lg shadow-md p-6 border border-gray-200">
  <h3 class="text-lg font-semibold text-gray-900 mb-2">Title</h3>
  <p class="text-gray-700">Body copy here.</p>
</div>
{/* css-is-awesome (React) */}
<Card title="Title">
  Body copy here.
</Card>

/* css-is-awesome (SCSS) */
.profile-card {
  @include m.card-base;
}

Step-by-step migration

Tailwind and cia can coexist in the same page while you convert. Don't do a big-bang rewrite.

  1. Install cia alongside Tailwind. Keep Tailwind where it is and add cia's theme + base stylesheets. See /docs/install.
  2. Pick a theme file. <html data-theme="press"> reskins the whole app without a rebuild. Preview themes before committing — see /docs/tokens.
  3. Convert one component type at a time. Start with buttons — highest visibility, lowest risk. Replace <button class="bg-blue-500 px-4 py-2 rounded"> with <Button variant="primary">.
  4. Replace stacked utilities in common layouts. flex items-center justify-center becomes cia-flex-center (markup) or @include m.flex-center (SCSS). A regex codemod handles the bulk.
  5. Delete Tailwind plugin imports for features cia handles — @tailwindcss/forms and @tailwindcss/typography both map to core cia.
  6. Remove Tailwind + PostCSS config. Delete tailwind.config.js, drop tailwind from package.json, remove @tailwind directives from your root CSS, and run npm run validate-themes to confirm nothing references Tailwind-only variables.

Gotchas

Further reading

Theme