Tailwind CSS vs Plain CSS
Which should you use for your next project? A practical comparison with code examples.
Comparison Table
| Tailwind CSS | Plain CSS | |
|---|---|---|
| Writing speed | Fast — classes applied inline | Slower — context switches to .css file |
| Bundle size (prod) | 5–15 KB (unused classes purged) | Grows as project scales |
| Naming things | Not needed — no class names to invent | Required — naming is hard |
| Design consistency | Built-in scale (spacing, colors) | Manual — must enforce system yourself |
| Responsive design | Easy with sm: md: lg: prefixes | Requires @media queries |
| Custom design | Arbitrary values: w-[317px] | Full control always |
| Learning curve | Medium — must learn utility classes | Low — already CSS |
| Framework fit | Excellent with React, Next.js, Vue | Works everywhere |
| CSS specificity issues | Rare — utilities have equal specificity | Common in large codebases |
| Theming / dark mode | Built-in dark: modifier | Custom properties + media queries |
| Animation | Animate utilities, extend in config | Full @keyframes control |
Same Button — Two Approaches
Tailwind CSS
<button class="
px-4 py-2
bg-blue-600 text-white
font-semibold rounded-lg
hover:bg-blue-700
focus:outline-none focus:ring-2
focus:ring-blue-500
transition-colors
">
Submit
</button>Plain CSS
/* button.css */
.btn-primary {
padding: 0.5rem 1rem;
background-color: #2563eb;
color: #fff;
font-weight: 600;
border-radius: 0.5rem;
border: none;
cursor: pointer;
transition: background-color 0.15s;
}
.btn-primary:hover {
background-color: #1d4ed8;
}
.btn-primary:focus {
outline: none;
box-shadow: 0 0 0 2px #3b82f6;
}Use Tailwind when:
- ✓ Building with React, Next.js, Vue, or Astro
- ✓ You want consistent spacing and colors across a team
- ✓ Rapid UI iteration is a priority
- ✓ You want responsive design without media queries
- ✓ You prefer co-locating styles with markup
Use Plain CSS when:
- ✓ No build step available (static HTML pages)
- ✓ You need complex animations or art-directed CSS
- ✓ The project already has a well-maintained CSS codebase
- ✓ You prefer separation of concerns between HTML and styles
- ✓ CSS Modules or CSS-in-JS fit your architecture better
Frequently Asked Questions
Is Tailwind CSS faster to write than plain CSS?
Yes. Utility classes are applied directly in HTML without switching to a separate CSS file. Design decisions (spacing, colors, breakpoints) are made inline with a constrained system, which speeds up UI development significantly.
Does Tailwind produce a larger CSS bundle than plain CSS?
No. Tailwind uses content scanning to remove unused classes. Production bundles are typically 5-15 KB, often smaller than hand-written CSS for large projects where dead CSS accumulates.
Can I use Tailwind with an existing CSS codebase?
Yes. Tailwind works alongside existing CSS. Add it incrementally — Tailwind classes and custom CSS do not conflict as long as there are no specificity collisions.
Does Tailwind CSS work without a build step?
Tailwind v3 requires a build step (PostCSS or the Tailwind CLI) to generate CSS. For quick prototypes, use the Tailwind CDN at play.tailwindcss.com — but the CDN is not suitable for production.
Is Tailwind CSS opinionated about design?
Tailwind provides a constrained design system with a specific scale for spacing, typography, and colors. You can customize or override all values in tailwind.config.js. The constraint is intentional — it keeps design consistent across a team.
Does Tailwind CSS replace CSS entirely?
No. Tailwind generates CSS — it is still CSS under the hood. You may still write custom CSS for complex animations, CSS-only patterns, or styles that Tailwind does not cover. Most Tailwind projects use 95% Tailwind utilities and 5% custom CSS.
Is Tailwind CSS harder to maintain than plain CSS?
Tailwind can be harder to maintain when class lists grow very long. Solutions include extracting components, using the @apply directive for repeated patterns, or using component libraries built on Tailwind. Plain CSS can have the opposite problem: unused styles accumulate and specificity conflicts grow.
Which is better for accessibility: Tailwind or CSS?
Accessibility is not determined by CSS methodology — it is about semantic HTML and ARIA. Both Tailwind and plain CSS can produce accessible or inaccessible UIs. Tailwind does not add or remove accessibility; the developer's HTML choices determine it.
From the blog
View all →
Jun 8, 2026
JavaScript Object to JSON: Serialization Patterns and Common Pitfalls

Jun 8, 2026
TypeScript to JavaScript: When and How to Strip Types

Jun 4, 2026
JavaScript Object to JSON: Serialization Patterns and Common Pitfalls

Jun 4, 2026
TypeScript to JavaScript: When and How to Strip Types

Jun 1, 2026
JSON to TypeScript: Auto-Generate Interfaces from API Responses
Need to convert existing CSS to Tailwind classes?
Use the CSS to Tailwind Converter →